Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→ 1,803,184 events total
2021-07-21 21:22:33 <maerwald> and that IS wrong
2021-07-21 21:22:54 <ph88_> oh
2021-07-21 21:23:31 <maerwald> even if you used something statically linking friendlier like mbedTLS... I think it's still wrong
2021-07-21 21:24:18 <maerwald> you need a really good update channel and mechanisms that use gpg signatures on top to make this not insanely insecure
2021-07-21 21:24:27 × falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Ping timeout: 255 seconds)
2021-07-21 21:24:27 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 255 seconds)
2021-07-21 21:24:30 <monochrom> geekosaur: Nice, thanks.
2021-07-21 21:24:41 lbseale joins (~lbseale@user/ep1ctetus)
2021-07-21 21:24:51 <maerwald> the distro will take care of fixing curl and openssl vulnerabilities
2021-07-21 21:24:57 <maerwald> don't try to compete with that
2021-07-21 21:25:16 × cheater quits (~Username@user/cheater) (Read error: Connection reset by peer)
2021-07-21 21:26:33 <monochrom> My principal component analysis merges "alpine" with "docker" because when I learned docker its tutorials use alpine all the time and I get a feeling of "so alpine is so barebone no one uses it by hand but great for docker".
2021-07-21 21:26:40 <monochrom> I mean, :)
2021-07-21 21:26:47 mthvedt joins (uid501949@id-501949.stonehaven.irccloud.com)
2021-07-21 21:27:17 <maerwald> I wrote an APKBUILD once and posted it to their ML for review. I never got an answer :>
2021-07-21 21:27:35 <hpc> that's like saying windows is great for running virtualbox
2021-07-21 21:27:39 <monochrom> So I interpret "solved by alpine" to mean "solved by docker" which is suddenly a tautology :)
2021-07-21 21:28:00 cheater joins (~Username@user/cheater)
2021-07-21 21:28:11 <maerwald> people run windows outside of virtualbox?
2021-07-21 21:28:36 <monochrom> hpc: Hey, my brain has the converse association, "virtualbox is great when I'm stuck in windows"
2021-07-21 21:28:40 <geekosaur> most people, even
2021-07-21 21:28:48 × o1lo01ol1o quits (~o1lo01ol1@bl11-109-140.dsl.telepac.pt) (Remote host closed the connection)
2021-07-21 21:28:54 <dsal> I don't understand people's obsession with curl. I also don't understand why curl thinks it needs to "support" every protocol.
2021-07-21 21:29:31 <maerwald> dsal: what's the alternative? Try haskell-tls and all those boys and see how it completely fails in the face of weird proxy and firewall configs
2021-07-21 21:30:10 × radw quits (~radw@user/radw) (Ping timeout: 240 seconds)
2021-07-21 21:30:23 <maerwald> I'm sure you would get it to work somehow on esoteric setups, but it's work. And curl has done it for you
2021-07-21 21:30:33 × aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net)
2021-07-21 21:30:54 × cheater quits (~Username@user/cheater) (Remote host closed the connection)
2021-07-21 21:31:06 × jumper149 quits (~jumper149@80.240.31.34) (Quit: WeeChat 3.2)
2021-07-21 21:31:11 <janus> dsal: just had an issue where a binary using network-bsd failed to look up the "tcp" protocol number because network doesn't support tcp natively :P https://hackage.haskell.org/package/network-3.1.2.2/docs/Network-Socket.html#v:socket
2021-07-21 21:31:28 <dsal> I use network-conduit-tls, but I don't know what it uses on a lower level.
2021-07-21 21:31:43 <glguy> I stopped using the Haskell TLS implementations after I found they weren't validating some certificates correctly. I don't remember what feature it was they had wrong (it's been years now) but I prefer trusting the more commonly used TLS implementations for that
2021-07-21 21:32:00 <janus> you take a binary that uses network-bsd , it will depend on /etc/protocols. and then when you run without that file, it can't find the TCP protocol number
2021-07-21 21:32:03 zangi joins (~zangi@103.154.230.230)
2021-07-21 21:32:20 <janus> i think it is good enough to use defaultProtocol but i'd love to hear if somebody knows of a platform where that breaks
2021-07-21 21:32:20 aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net)
2021-07-21 21:32:44 <zangi> is there a language pragma that allows me to `type Foo = [(Int,a)]`
2021-07-21 21:33:02 <dsal> zangi: what is a?
2021-07-21 21:33:17 jespada joins (~jespada@90.254.247.46)
2021-07-21 21:33:18 <glguy> janus: usually you wouldn't specify the protocol manually. That's getAddrInfo's job
2021-07-21 21:33:25 cheater joins (~Username@user/cheater)
2021-07-21 21:33:30 <zangi> dsal: any type
2021-07-21 21:33:46 <dsal> zangi: It doesn't exist on the left side of the = though.
2021-07-21 21:33:52 × sqrt2 quits (~ben@tunnel330957-pt.tunnel.tserv6.fra1.ipv6.he.net) (Ping timeout: 245 seconds)
2021-07-21 21:33:58 <maerwald> RankNTypes
2021-07-21 21:34:10 <maerwald> and then `type Foo = forall a. [(Int, a)]`
2021-07-21 21:34:14 <maerwald> and then pain
2021-07-21 21:34:25 <janus> glguy: aah ok, so you're saying the socket function linked should always be used with getAddrInfo like it is in the example?
2021-07-21 21:34:38 <glguy> e.g. https://github.com/glguy/irc-core/blob/v2/hookup/src/Hookup.hs#L347-L352
2021-07-21 21:34:40 <monochrom> Is there any reason why you reject `type Foo a = [(Int,a)]`?
2021-07-21 21:35:26 <zangi> monochrom: woah, it exists, I thought I can only do that with `data Foo a`
2021-07-21 21:35:39 <janus> aah ok that makes sense now. so the ProtocolNumber constructor should really be private, hmmm
2021-07-21 21:35:44 <dsal> janus: That's how I end up doing it. getAddrInfo -> socket.
2021-07-21 21:36:20 sqrt2 joins (~ben@80-108-18-7.cable.dynamic.surfer.at)
2021-07-21 21:36:28 <dsal> Looking at this code... I'm suddenly wondering why I'm not using all the results from getAddrInfo
2021-07-21 21:36:46 <glguy> dsal: you should be, it's not trivial to do so though
2021-07-21 21:37:12 × Obo quits (~roberto@70.pool90-171-81.dynamic.orange.es) (Ping timeout: 252 seconds)
2021-07-21 21:37:14 <dsal> For this case, it's pretty easy. This program is just trying to see if it's possible to connect to a host. So if it can connect to any address, it succeeds.
2021-07-21 21:37:23 <glguy> the module I linked to above has a bunch of logic for trying them all, gathering failures, doing that concurrently
2021-07-21 21:37:23 × ph88_ quits (~ph88@ip5f5af6fd.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
2021-07-21 21:37:51 <arkanoid> starter here on his first day with haskell. What's the best website to search for an existing function? For example split a string into list of strings by char or list of chars
2021-07-21 21:37:52 <janus> is there a library that does happy eyeballs in haskell? seems like the good concurrency support could help with it
2021-07-21 21:38:18 <glguy> janus: there are one or two approximations; nothing definitive
2021-07-21 21:38:24 <sm> https://hoogle.haskell.org, arkanoid
2021-07-21 21:38:32 <arkanoid> thanks
2021-07-21 21:38:35 <glguy> janus: That module is as close as I got to the process
2021-07-21 21:38:38 <dsal> arkanoid: You may want to read through the Data.List docs for what you're doing.
2021-07-21 21:39:57 agua joins (~agua@2804:18:4e:2dda:1:0:4058:6b7c)
2021-07-21 21:39:58 <Ariakenom> arkanoid: +1 for hoogle. you can search by type!
2021-07-21 21:40:15 ph88 joins (~ph88@2a02:8109:9e00:7e5c:6daa:57bf:6d41:6cd9)
2021-07-21 21:40:28 <dsal> @hoogle Char -> String -> [String]
2021-07-21 21:40:29 <lambdabot> Distribution.Simple.Utils unintersperse :: Char -> String -> [String]
2021-07-21 21:40:29 <lambdabot> Distribution.Utils.Generic unintersperse :: Char -> String -> [String]
2021-07-21 21:40:29 <lambdabot> Util split :: Char -> String -> [String]
2021-07-21 21:40:39 <dsal> "unintersperse"
2021-07-21 21:40:39 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 255 seconds)
2021-07-21 21:41:01 <sm> arkanoid: https://hoogle.haskell.org/?hoogle=%5Ba%5D+-%3E+%5Ba%5D+-%3E+%5B%5Ba%5D%5D&scope=set%3Astackage for example. The general type (a) gives better results than String in this case
2021-07-21 21:41:04 <dsal> @hoogle unintercalate
2021-07-21 21:41:04 <lambdabot> No results found
2021-07-21 21:42:00 × pesada quits (~agua@2804:14c:8793:8e2f:6091:e445:c3bf:d39e) (Ping timeout: 255 seconds)
2021-07-21 21:42:01 <janus> glguy: code looks very generic, cool, thanks
2021-07-21 21:42:19 × Ariakenom quits (~Ariakenom@c83-255-154-140.bredband.tele2.se) (Quit: Leaving)
2021-07-21 21:42:20 drd joins (~drd@2001:b07:a70:9f1f:1562:34de:f50f:77d4)
2021-07-21 21:42:56 <glguy> janus: that's the code I needed for connecting my IRC client to an IRC server. It has a permissive license if you want to loot it. If there are missing features you need you can ping me and I'm happy to adapt it within reason.
2021-07-21 21:42:59 × fluffyballoon quits (~fluffybal@pat-verona-l.epic.com) (Quit: Client closed)
2021-07-21 21:43:45 <janus> one day i'll have to try out your irc client. problem is that irssi does the job... so far :P
2021-07-21 21:43:53 <glguy> If it did the job I'd just use it!
2021-07-21 21:44:10 <janus> what can i say, i am a modest man
2021-07-21 21:44:20 <arkanoid> is there a general rule to expect the order of the arguments of an existing function? In this case is more probable to find "Char -> String -> [String]" or "String -> Char -> [String]"?
2021-07-21 21:46:19 fluffyballoon joins (~fluffybal@pat-verona-l.epic.com)
2021-07-21 21:46:42 <arkanoid> well of course it depends if the function I'm looking for is possible polymorphic or not
2021-07-21 21:48:32 × drd quits (~drd@2001:b07:a70:9f1f:1562:34de:f50f:77d4) (Quit: ZNC 1.8.2 - https://znc.in)
2021-07-21 21:48:40 <Logio> no general rules, but you can usually make a good guess based if you know what the function does
2021-07-21 21:48:43 <glguy> arkanoid: the types of the arguments don't have much to do with the ordering
2021-07-21 21:49:16 drd joins (~drd@93-39-151-19.ip76.fastwebnet.it)
2021-07-21 21:50:11 <Logio> there are cases where there is some "natural" partial application of a function, which usually promotes some order
2021-07-21 21:51:11 <Logio> but that's more an intuition you build when building your own functions, less one that helps you find functions
2021-07-21 21:51:12 <arkanoid> I see that sm suggested a search by key "[a] -> [a] -> [[a]]" so that the first two parameters can be both [Char], but this is just by chance that I need actually a function that requires two lists as input
2021-07-21 21:51:26 × ph88 quits (~ph88@2a02:8109:9e00:7e5c:6daa:57bf:6d41:6cd9) (Read error: Connection reset by peer)
2021-07-21 21:51:33 × aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Read error: Connection reset by peer)

All times are in UTC.