Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→ 1,804,544 events total
2021-08-29 20:23:58 <c_wraith> that's clearly out of date
2021-08-29 20:24:04 <c_wraith> Toml.str doesn't exist
2021-08-29 20:24:17 <c_wraith> examples always lie
2021-08-29 20:25:23 <c_wraith> Ah. It expects you to have OverloadedStrings enabled.
2021-08-29 20:25:39 <c_wraith> I'd skip that and just call fromString so that inference remains sane
2021-08-29 20:26:40 × thyriaen quits (~thyriaen@x4dbfddec.dyn.telefonica.de) (Remote host closed the connection)
2021-08-29 20:29:15 burnsidesLlama joins (~burnsides@dhcp168-015.wadham.ox.ac.uk)
2021-08-29 20:29:39 × Boomerang quits (~Boomerang@xd520f68c.cust.hiper.dk) (Ping timeout: 250 seconds)
2021-08-29 20:31:22 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.2)
2021-08-29 20:33:04 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-08-29 20:33:37 × burnsidesLlama quits (~burnsides@dhcp168-015.wadham.ox.ac.uk) (Ping timeout: 248 seconds)
2021-08-29 20:34:31 d0ku joins (~d0ku@178.43.56.75.ipv4.supernova.orange.pl)
2021-08-29 20:35:06 × arjun quits (~Srain@user/arjun) (Remote host closed the connection)
2021-08-29 20:36:26 <_bin> Thanks, I appreciate it
2021-08-29 20:39:41 <_bin> c_wraith: Weirdly, it's still not working with OverloadedStrings. How would I go about using `fromString` to resolve this?
2021-08-29 20:40:16 <c_wraith> same code, just enabled OverloadedStrings? What error is it giving you now?
2021-08-29 20:42:49 <_bin> Yes, exact same but with OverloadedStrings. Same error: "Couldn't match expected type ‘Toml.Key’ with actual type ‘[Char]’"
2021-08-29 20:43:29 <c_wraith> That suggests you didn't actually enable OverloadedStrings. It would give an error message about IsString a => a instead of [Char]
2021-08-29 20:44:13 <_bin> Oh dang, you're right. It appears I accidentally put my language directive after the module where line. My bad.
2021-08-29 20:44:29 <c_wraith> easy mistake to make, really. I've done it several times.
2021-08-29 20:45:14 <maerwald> you can also just use `fromString`
2021-08-29 20:45:24 <maerwald> it may be more hygienic
2021-08-29 20:45:59 <c_wraith> You'll note that was my original recommendation. :P
2021-08-29 20:46:08 × zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!)
2021-08-29 20:46:17 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
2021-08-29 20:46:45 <c_wraith> _bin: in case you're curious.. The OverloadedStrings extension just adds fromString calls to all string *literals* in the code. You can apply those calls yourself, if you so desire.
2021-08-29 20:46:52 <maerwald> yeah, overloadedstrings can confuse type inference etc
2021-08-29 20:47:16 <_bin> Oh, handy to know, thanks. I'll give that a shot instead.
2021-08-29 20:47:18 <maerwald> it would be cool if you could specify for which literals it works
2021-08-29 20:48:40 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 240 seconds)
2021-08-29 20:48:41 Lord_of_Life_ is now known as Lord_of_Life
2021-08-29 20:49:11 jtomas_ joins (~jtomas@233.red-83-34-2.dynamicip.rima-tde.net)
2021-08-29 20:49:47 <maerwald> that would also solve half of the bytestring debacle, because you could just ban the instance
2021-08-29 20:50:34 × ubert quits (~Thunderbi@178.165.168.136.wireless.dyn.drei.com) (Ping timeout: 252 seconds)
2021-08-29 20:50:40 <Cale> I think a default declaration might work?
2021-08-29 20:51:22 <Cale> At least, if what you want is the same as annotating all the ambiguous stuff with :: Text or some such.
2021-08-29 20:52:04 elf_fortrezz joins (~elf_fortr@adsl-72-50-5-53.prtc.net)
2021-08-29 20:52:36 <c_wraith> Not by itself. Maybe with ExtendedDefaultRules that would work
2021-08-29 20:53:46 <Cale> Haskell’s defaulting mechanism (Haskell Report, Section 4.3.4) is extended to cover string literals, when OverloadedStrings is specified. Specifically:
2021-08-29 20:53:46 <Cale> Each type in a default declaration must be an instance of Num or of IsString.
2021-08-29 20:53:46 <Cale> If no default declaration is given, then it is just as if the module contained the declaration default( Integer, Double, String).
2021-08-29 20:53:46 <Cale> The standard defaulting rule is extended thus: defaulting applies when all the unresolved constraints involve standard classes or IsString; and at least one is a numeric class or IsString.
2021-08-29 20:54:06 <c_wraith> oh, huh. I didn't realize OverloadedStrings included that
2021-08-29 20:55:26 <Cale> I didn't know about it either, just suspected that someone might've done it due to the purpose of defaulting in the first place.
2021-08-29 20:58:14 <_bin> Cale: Oh cool, thanks for mentioning that.
2021-08-29 21:00:49 × mikoto-chan quits (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 248 seconds)
2021-08-29 21:01:15 takuan joins (~takuan@178-116-218-225.access.telenet.be)
2021-08-29 21:01:54 ubert joins (~Thunderbi@178.165.168.136.wireless.dyn.drei.com)
2021-08-29 21:02:40 __monty__ joins (~toonn@user/toonn)
2021-08-29 21:03:27 × elf_fortrezz quits (~elf_fortr@adsl-72-50-5-53.prtc.net) (Quit: Client closed)
2021-08-29 21:07:04 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
2021-08-29 21:07:18 × cryptomonad quits (~cryptomon@194.191.225.149) (Remote host closed the connection)
2021-08-29 21:09:48 Codaraxis__ joins (~Codaraxis@user/codaraxis)
2021-08-29 21:13:44 × Codaraxis_ quits (~Codaraxis@user/codaraxis) (Ping timeout: 250 seconds)
2021-08-29 21:14:01 Codaraxis joins (~Codaraxis@user/codaraxis)
2021-08-29 21:15:19 × jtomas_ quits (~jtomas@233.red-83-34-2.dynamicip.rima-tde.net) (Ping timeout: 252 seconds)
2021-08-29 21:17:31 × Codaraxis__ quits (~Codaraxis@user/codaraxis) (Ping timeout: 252 seconds)
2021-08-29 21:23:17 opac joins (~opac@ip-28-56.sn2.clouditalia.com)
2021-08-29 21:24:00 <opac> any book/articles/blogs about haskell bug/vulnerabilities?
2021-08-29 21:26:03 Codaraxis_ joins (~Codaraxis@user/codaraxis)
2021-08-29 21:27:21 <maerwald> opac: we've been pretending that doesn't exist... I'm still waiting for the first big incident
2021-08-29 21:27:22 <sm> nope, never happens
2021-08-29 21:27:32 <maerwald> we don't even have a CVE workflow
2021-08-29 21:27:37 Codaraxis__ joins (~Codaraxis@user/codaraxis)
2021-08-29 21:29:07 <opac> lol
2021-08-29 21:29:25 <opac> no segfaults ? :(
2021-08-29 21:29:37 × Codaraxis quits (~Codaraxis@user/codaraxis) (Ping timeout: 252 seconds)
2021-08-29 21:30:04 <davean> opac: how would you get a segv with Haskell? You'd have to really do something thats explicitely a problem
2021-08-29 21:30:34 <maerwald> easily via borked ffi
2021-08-29 21:31:27 × Codaraxis_ quits (~Codaraxis@user/codaraxis) (Ping timeout: 240 seconds)
2021-08-29 21:32:37 <opac> davean: I dont know. I am interested in learning how those cases happen. Never wrote 1 line of haskell :x
2021-08-29 21:32:54 <opac> Im young :X
2021-08-29 21:32:57 <maerwald> https://www.haskell.org/ghc/blog/20210709-capi-usage.html
2021-08-29 21:33:07 <jpds> opac: Maybe start with a book on Haskell itself then
2021-08-29 21:33:24 janiczek joins (~janiczek@89-24-215-117.customers.tmcz.cz)
2021-08-29 21:33:27 × Codaraxis__ quits (~Codaraxis@user/codaraxis) (Ping timeout: 240 seconds)
2021-08-29 21:34:16 <opac> jpds will do
2021-08-29 21:36:39 <monochrom> I don't understand the motivation behind the question. Suppose I had never learned C. I don't suppose it would be productive to read "C bugs/vulnerability blogs". Unless my goal were to look for something to laugh at.
2021-08-29 21:36:50 <maerwald> :D
2021-08-29 21:37:01 <maerwald> or win a specific argument
2021-08-29 21:37:57 <davean> maerwald: yes, ffi is explicitely a problem, as is unsafe coerce
2021-08-29 21:38:16 <davean> You want to do both sometimes, but its pretty clear that they can be a problem
2021-08-29 21:42:04 <opac> monochrom: i have interest in security related topics thats why and was looking for a writeup or blog of a haskell's program being exploited (rare) - if I come with one, can I turn to NFT?
2021-08-29 21:42:47 <opac> davean: you'd say ffi is the source of prior `bugs`?
2021-08-29 21:42:51 <monochrom> Would you understand it? Do you have the Haskell knowledge to understand it?
2021-08-29 21:43:21 <monochrom> Like I said, if I hadn't learned C, I would not understand an article that requires knowledge in C.
2021-08-29 21:43:42 <opac> well depends, which other langs you know
2021-08-29 21:44:10 <monochrom> Haskell. Pascal.
2021-08-29 21:45:43 <opac> since the syntax is way simpler... if the writeup is detailed... then I am sure you'd have an enjoyable time reading C
2021-08-29 21:45:52 <davean> No, I don't think so at all
2021-08-29 21:46:05 <davean> That misses the poin tof whats important to understand this
2021-08-29 21:46:05 <maerwald> https://frasertweedale.github.io/blog-fp/posts/2021-02-12-haskell-dependency-confusion.html
2021-08-29 21:46:18 <davean> The only thing close enough to be useful for me to understand C is probably assembly
2021-08-29 21:47:01 <janiczek> Hey there, I'm writing manual combined Except+State monad impl in Elm and I can't figure out the ending of andThen (bind). I'm sure it's something silly. Could you take a look? https://gist.github.com/Janiczek/a979c8a8f59d4a5186b2a340991a3aef
2021-08-29 21:47:06 <maerwald> I believe there was a hacking course too, but I can't find it anymore
2021-08-29 21:47:59 × kenran quits (~kenran@200116b82b597200c49c746a42f32f39.dip.versatel-1u1.de) (Quit: WeeChat info:version)
2021-08-29 21:49:20 × fendor quits (~fendor@178.165.182.151.wireless.dyn.drei.com) (Read error: Connection reset by peer)
2021-08-29 21:50:58 <opac> thanks for your thoughs
2021-08-29 21:51:12 <monochrom> janiczek: I understand "s -> Result e (s, a)", and I understand "s -> (s, Result e a)". But I don't understand "Result e (s -> (s, a))". Do you?
2021-08-29 21:52:24 <janiczek> @monochrom: Um, you're saying State . Except makes sense but Except . State isn't possible?

All times are in UTC.