2022/03/30

2022-03-30 00:00:01 +0200 <tomsmeding> yeah
2022-03-30 00:00:18 +0200 <sm> 👍️
2022-03-30 00:00:26 +0200 <tomsmeding> as you can see on http://play-haskell.tomsmeding.com:8123/LwAM5UU5 I got half-way with one direction of that :p
2022-03-30 00:01:43 +0200k8yun_(~k8yun@user/k8yun) (Quit: Leaving)
2022-03-30 00:02:21 +0200 <abastro[m]> <maerwald> "here's why unix is hard: https:/..." <- Interesting that hasufell, ghcup dev, was actively involved in the issue discussion
2022-03-30 00:02:47 +0200 <tomsmeding> abastro[m]: maerwald = hasufell
2022-03-30 00:03:02 +0200 <abastro[m]> Oh?!?!?
2022-03-30 00:03:15 +0200DNH(~DNH@2a02:8108:1100:16d8:61e3:f551:d48e:e2b3) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2022-03-30 00:03:26 +0200 <maerwald> I was just trying to get hired as a bash developer xD
2022-03-30 00:03:32 +0200unit73e(~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) (Ping timeout: 252 seconds)
2022-03-30 00:03:38 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
2022-03-30 00:03:41 +0200DNH(~DNH@2a02:8108:1100:16d8:61e3:f551:d48e:e2b3)
2022-03-30 00:03:50 +0200 <Franciman> maerwald: are you saying that it's easier to live as a bash dev than fixing laziness bugs?
2022-03-30 00:04:05 +0200sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 250 seconds)
2022-03-30 00:04:23 +0200alx741(~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 260 seconds)
2022-03-30 00:04:27 +0200 <maerwald> bash is like coding C... one line per day is exhausting and then you think about it over the weekend and find bugs during your sleep
2022-03-30 00:04:38 +0200Pickchea(~private@user/pickchea)
2022-03-30 00:04:51 +0200 <abastro[m]> XD
2022-03-30 00:05:01 +0200 <abastro[m]> At least you do not need to type much
2022-03-30 00:05:02 +0200 <sm> not any more! Fire up fly-check & ShellCheck !
2022-03-30 00:05:37 +0200machinedgod(~machinedg@24.105.81.50) (Ping timeout: 246 seconds)
2022-03-30 00:05:41 +0200 <abastro[m]> ShellCheck noticed my `dev/null | ..` and removed it.
2022-03-30 00:05:55 +0200 <maerwald> hehe, ShellCheck is good. But there are some corner cases where it may introduce a bug if you rely on quirks, especially with quoting
2022-03-30 00:06:03 +0200alx741(~alx741@host-181-198-243-150.netlife.ec)
2022-03-30 00:07:00 +0200 <abastro[m]> Relying on quoting quirks?
2022-03-30 00:07:23 +0200 <maerwald> tomsmeding: I'm thinking the playground should randomize the starting code
2022-03-30 00:07:56 +0200 <tomsmeding> give a different bug to each visitor?
2022-03-30 00:07:57 +0200 <maerwald> maybe from the pastes... can we keep a list of runnable playground pastes?
2022-03-30 00:08:05 +0200kaph_(~kaph@net-93-67-57-97.cust.vodafonedsl.it)
2022-03-30 00:08:19 +0200 <maerwald> those that compiled
2022-03-30 00:08:23 +0200 <boxscape_> is that a typescript autocompletion when trying to write an import statement?
2022-03-30 00:08:35 +0200kaph(~kaph@net-31-156-214-2.cust.vodafonedsl.it) (Ping timeout: 256 seconds)
2022-03-30 00:08:35 +0200 <maerwald> some internal table with maybe 100 results
2022-03-30 00:08:40 +0200 <maerwald> boxscape_: yeah
2022-03-30 00:08:42 +0200 <tomsmeding> I think we cannot just present people's pastes like that, have to curate a selection
2022-03-30 00:08:47 +0200 <boxscape_> I see
2022-03-30 00:09:22 +0200 <maerwald> they have a rust parser https://github.com/codemirror/codemirror.next/tree/5377e5104d3424734b5fa0f5f2d66a5a7ea916f4/lang-r…
2022-03-30 00:09:24 +0200 <maerwald> but not haskell
2022-03-30 00:09:26 +0200 <maerwald> darn
2022-03-30 00:10:59 +0200 <maerwald> the parser is lazy or so... so even if you have 100million lines and you scroll down, it won't crash your page
2022-03-30 00:11:08 +0200 <sm> idea to get more styling help: include a link to the source repo, and one specifically to the css file asking for help
2022-03-30 00:11:13 +0200alx741(~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 246 seconds)
2022-03-30 00:12:05 +0200 <tomsmeding> ok maybe the play thing should truncate output if it's too long
2022-03-30 00:12:30 +0200 <tomsmeding> my firefox had some issue rendering [1..1000000]
2022-03-30 00:12:51 +0200 <maerwald> doesn't seem too hard though: https://github.com/lezer-parser/rust/blob/main/src/rust.grammar
2022-03-30 00:12:58 +0200 <maerwald> who knows haskell grammar well? :p
2022-03-30 00:12:59 +0200 <tomsmeding> but yeah so mergesort doesn't time out where quicksort does :)
2022-03-30 00:13:02 +0200 <tomsmeding> mergesort > quicksort in haskell
2022-03-30 00:13:22 +0200 <tomsmeding> "lezer" -- that sounds like dutch
2022-03-30 00:13:23 +0200 <maerwald> the best mergesort is bottom-up
2022-03-30 00:13:34 +0200alx741(~alx741@host-181-198-243-150.netlife.ec)
2022-03-30 00:13:35 +0200 <maerwald> I think it's also partly in-place
2022-03-30 00:14:11 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net)
2022-03-30 00:14:50 +0200 <maerwald> we can also do the quicksort in-place
2022-03-30 00:15:06 +0200kuribas(~user@ptr-25vy0i96ymkampl0mim.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3))
2022-03-30 00:15:14 +0200gehmehgeh(~user@user/gehmehgeh) (Quit: Leaving)
2022-03-30 00:15:18 +0200 <boxscape_> Might it be possible to use the GHC API for parsing?
2022-03-30 00:15:25 +0200 <tomsmeding> boxscape_: in JS?
2022-03-30 00:15:33 +0200 <boxscape_> ah, hm, I didn't think of that
2022-03-30 00:15:42 +0200 <maerwald> ghcjs? :D
2022-03-30 00:15:47 +0200 <tomsmeding> plz no
2022-03-30 00:15:50 +0200 <maerwald> haha
2022-03-30 00:16:06 +0200 <tomsmeding> I've said this before, ghcjs is an amazing technical feat, but...
2022-03-30 00:17:33 +0200 <boxscape_> asterius? I suppose it's probably difficult to get that to compile the ghc library
2022-03-30 00:17:41 +0200 <boxscape_> (mainly because it's not listed as supported)
2022-03-30 00:18:37 +0200alx741(~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 240 seconds)
2022-03-30 00:18:50 +0200 <maerwald> maybe the new HF ED can do it
2022-03-30 00:18:58 +0200 <maerwald> as a community test
2022-03-30 00:19:00 +0200 <maerwald> :D
2022-03-30 00:19:03 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Ping timeout: 260 seconds)
2022-03-30 00:19:38 +0200 <boxscape_> to make it clear to him what he signed up for eh
2022-03-30 00:19:55 +0200 <abastro[m]> In the github thread I saw hasufell fighting (someone who likely doesn't know what they are talking about). Interesting..
2022-03-30 00:20:31 +0200 <maerwald> impossible
2022-03-30 00:21:28 +0200alx741(~alx741@host-181-198-243-150.netlife.ec)
2022-03-30 00:22:30 +0200 <janus> abastro[m]: https://hasufell.github.io/pages/Contact.html
2022-03-30 00:22:40 +0200 <abastro[m]> * hasufell fighting against (someone who
2022-03-30 00:22:43 +0200vicfred(~vicfred@user/vicfred) (Quit: Leaving)
2022-03-30 00:23:08 +0200 <abastro[m]> Oh
2022-03-30 00:23:27 +0200 <abastro[m]> It is also powered by hakyll, hmm seems like many ppl are using it
2022-03-30 00:23:43 +0200 <abastro[m]> Does it mean I can use it as well right
2022-03-30 00:24:19 +0200 <sm> nope, it has reached the cutoff, sorry, no more hakyll sites allowed
2022-03-30 00:26:11 +0200 <abastro[m]> Oh noooo
2022-03-30 00:27:51 +0200 <hpc> a few rails slots just opened up, hurry before you're forced to use wordpress :D
2022-03-30 00:30:08 +0200Tuplanolla(~Tuplanoll@91-159-69-98.elisa-laajakaista.fi) (Quit: Leaving.)
2022-03-30 00:30:24 +0200xcmw(~textual@dyn-72-33-2-250.uwnet.wisc.edu)
2022-03-30 00:30:43 +0200 <abastro[m]> Btw, how feasible is it to use purescript on hakyll
2022-03-30 00:31:06 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-03-30 00:31:20 +0200 <xcmw> kuribas: It is supposed to solve the problem of reusing what can be reused and only computing what is needed for LSP
2022-03-30 00:31:21 +0200 <abastro[m]> It seems that purescript does botb html generation and redirecting part, so it makes me a bit confused.
2022-03-30 00:32:15 +0200seydar(~seydar@154-27-113-252.starry-inc.net)
2022-03-30 00:32:28 +0200alx741(~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 260 seconds)
2022-03-30 00:32:34 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 246 seconds)
2022-03-30 00:32:41 +0200 <seydar> is Network.Simple.TCP actually meant to be used? its version is 0.4.5, so I'm worried that I'm going down the wrong path by learning it
2022-03-30 00:33:07 +0200 <seydar> it's just... listening on a port via Network.Simple is kinda (please don't hurt me) burdensome
2022-03-30 00:34:24 +0200jgeerds(~jgeerds@d5364b87.access.ecotel.net) (Ping timeout: 272 seconds)
2022-03-30 00:34:26 +0200machinedgod(~machinedg@24.105.81.50)
2022-03-30 00:35:08 +0200alx741(~alx741@host-181-198-243-150.netlife.ec)
2022-03-30 00:35:32 +0200 <davean> The standard package is https://hackage.haskell.org/package/network
2022-03-30 00:35:35 +0200jpds(~jpds@gateway/tor-sasl/jpds) (Ping timeout: 240 seconds)
2022-03-30 00:36:21 +0200Inst(~Liam@c-98-208-218-119.hsd1.fl.comcast.net) (Ping timeout: 256 seconds)
2022-03-30 00:37:41 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-03-30 00:37:46 +0200jpds(~jpds@gateway/tor-sasl/jpds)
2022-03-30 00:40:47 +0200alx741(~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 260 seconds)
2022-03-30 00:41:33 +0200 <geekosaur> I think it's a low level interface, roughly the same thing you'd do in C to listen on an arbitrary port. Normally you'd use a higher levelpackage for whatever it is you're trying to do
2022-03-30 00:42:28 +0200alx741(~alx741@host-181-198-243-150.netlife.ec)
2022-03-30 00:44:02 +0200 <seydar> geekosaur: is there a preferred higher-level package for network ops? or is it, like davean said, just Network?
2022-03-30 00:44:15 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds)
2022-03-30 00:44:28 +0200motherfsck(~motherfsc@user/motherfsck) (Ping timeout: 246 seconds)
2022-03-30 00:44:29 +0200 <seydar> I'm struggling to figure out how to get `getAddrInfo` to take a port number (1024) instead of a port hint ("http")
2022-03-30 00:45:41 +0200 <sm> abastro hakyll just makes websites, so why couldn't you publish some purescript on those too
2022-03-30 00:46:09 +0200 <dons> morning all.
2022-03-30 00:46:16 +0200 <abastro[m]> Oh, makes sense! Thank you
2022-03-30 00:46:20 +0200 <sm> morning dons o/
2022-03-30 00:46:22 +0200 <abastro[m]> Perhaps then I'd learn purescript
2022-03-30 00:46:45 +0200motherfsck(~motherfsc@user/motherfsck)
2022-03-30 00:47:02 +0200 <davean> seydar: if you have the port number and such, you wouldn't use getAddrInfo?
2022-03-30 00:47:10 +0200 <sm> (but of course it'll be confusing, they're each confusing on their own so you'll have double the fun)
2022-03-30 00:47:11 +0200 <davean> seydar: the only thing getAddrInfo does is resolve that
2022-03-30 00:47:18 +0200 <seydar> davean: I'm having trouble understanding the API — what should i be using instead?
2022-03-30 00:47:37 +0200 <davean> seydar: if you ahve the numeric versions you just construct the AddrInfo you want
2022-03-30 00:47:39 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-03-30 00:47:41 +0200 <davean> because you *already have it*
2022-03-30 00:48:46 +0200alx741(~alx741@host-181-198-243-150.netlife.ec) (Quit: alx741)
2022-03-30 00:49:31 +0200 <monochrom> I suppose getAddrInfo also does hostname lookup, not just "http"->80.
2022-03-30 00:49:50 +0200 <davean> hence "versions"
2022-03-30 00:49:53 +0200ec(~ec@gateway/tor-sasl/ec) (Quit: ec)
2022-03-30 00:50:45 +0200 <monochrom> But ironically the doc has "let hints = defaultHints { addrFlags = [AI_NUMERICHOST], addrSocketType = Stream }" which is relevant for supplying "80" as the string, if you poke around the names mentioned.
2022-03-30 00:51:14 +0200 <monochrom> Ugh damn English. s/relevant for/relevant to/ .
2022-03-30 00:51:17 +0200alx741(~alx741@host-181-198-243-150.netlife.ec)
2022-03-30 00:51:20 +0200 <monochrom> Prepositions die die die.
2022-03-30 00:51:37 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net)
2022-03-30 00:52:06 +0200 <monochrom> Err nevermind NUMERICHOST is not about service/port, sorry!
2022-03-30 00:52:11 +0200motherfsck(~motherfsc@user/motherfsck) (Ping timeout: 250 seconds)
2022-03-30 00:52:30 +0200 <monochrom> But there is AI_NUMERICSERV
2022-03-30 00:52:53 +0200Topsi(~Tobias@dyndsl-095-033-095-210.ewe-ip-backbone.de) (Read error: Connection reset by peer)
2022-03-30 00:53:10 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
2022-03-30 00:53:44 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-03-30 00:54:09 +0200 <monochrom> OTOH to a large extent you can supply a junk (but working) service name, get your SockAddr, then override its port part to your liking. That is, if you use getAddrInfo at all, which is not compulsory.
2022-03-30 00:54:34 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2022-03-30 00:54:56 +0200ec(~ec@gateway/tor-sasl/ec)
2022-03-30 00:55:51 +0200alx741(~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 250 seconds)
2022-03-30 00:56:38 +0200 <monochrom> Because for DNS lookup you can use network-bsd instead.
2022-03-30 00:56:57 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Ping timeout: 250 seconds)
2022-03-30 00:57:14 +0200seydar(~seydar@154-27-113-252.starry-inc.net) (Ping timeout: 260 seconds)
2022-03-30 00:58:06 +0200alx741(~alx741@host-181-198-243-150.netlife.ec)
2022-03-30 00:59:15 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 240 seconds)
2022-03-30 01:00:00 +0200seydar(~seydar@154-27-113-252.starry-inc.net)
2022-03-30 01:00:18 +0200 <koz> Is there a way to programmatically dump the contents of PATH?
2022-03-30 01:01:07 +0200 <monochrom> System.Environment has some kind of getEnv.
2022-03-30 01:01:39 +0200 <geekosaur> https://downloads.haskell.org/ghc/8.10.7/docs/html/libraries/filepath-1.4.2.1/System-FilePath-Posi… ?
2022-03-30 01:01:44 +0200 <monochrom> lookupEnv is probably nicer to work with.
2022-03-30 01:01:54 +0200 <geekosaur> (well, yiou';d use System.FilePath for portability)
2022-03-30 01:02:00 +0200 <monochrom> Oh, that's even nicer.
2022-03-30 01:02:05 +0200 <koz> Nice!
2022-03-30 01:02:20 +0200 <seydar> monochrom: what's my alternative to getAddrInfo?
2022-03-30 01:02:34 +0200 <seydar> I'm struggling to just create a SockAddrInet
2022-03-30 01:03:03 +0200 <monochrom> I need to use that in my https://github.com/treblacy/ep haha, as opposed to rolling my own splitter.
2022-03-30 01:05:23 +0200alx741(~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 250 seconds)
2022-03-30 01:06:00 +0200alx741(~alx741@host-181-198-243-150.netlife.ec)
2022-03-30 01:07:00 +0200 <seydar> davean: since I don't need to use getAddrInfo, what is the alternative? It feels like `SockAddrInet 1024 (word32 conversion of a string)` is the wrong answer
2022-03-30 01:08:36 +0200Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
2022-03-30 01:09:59 +0200Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
2022-03-30 01:11:11 +0200alx741(~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 245 seconds)
2022-03-30 01:14:03 +0200alx741(~alx741@host-181-198-243-150.netlife.ec)
2022-03-30 01:14:46 +0200sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-03-30 01:15:43 +0200mud(~mud@user/kadoban) (Quit: quit)
2022-03-30 01:17:02 +0200zeenk(~zeenk@2a02:2f04:a313:d600:8d26:ec9f:3ff6:fc94) (Quit: Konversation terminated!)
2022-03-30 01:17:25 +0200 <janus> seydar: did you see https://hackage.haskell.org/package/network-3.1.2.7/docs/Network-Socket.html#v:tupleToHostAddress
2022-03-30 01:18:09 +0200szkl(uid110435@id-110435.uxbridge.irccloud.com)
2022-03-30 01:18:16 +0200 <seydar> janus: i did, but how do i get to the tuple to begin with?
2022-03-30 01:19:07 +0200alx741(~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 246 seconds)
2022-03-30 01:19:18 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2022-03-30 01:19:42 +0200 <janus> seydar: oh, you're not starting with an IP address?
2022-03-30 01:19:52 +0200hololeap(~hololeap@user/hololeap) (Excess Flood)
2022-03-30 01:20:13 +0200 <seydar> janus: I have "0.0.0.0" and 1024, and I'm trying to create an address from that
2022-03-30 01:20:35 +0200 <janus> right, then you can just put 0 in each of those tuple entries using tupleToHostAddress
2022-03-30 01:20:36 +0200zeenk(~zeenk@2a02:2f04:a313:d600:8d26:ec9f:3ff6:fc94)
2022-03-30 01:20:40 +0200 <seydar> i can combine them and do SockAddrUnix "0.0.0.0:1024", but I'm trying to create an addr with separate parts, akin to SockAddrInet 1024 "0.0.0.0"
2022-03-30 01:20:54 +0200 <janus> % :m +Network.Socket
2022-03-30 01:20:55 +0200 <yahb> janus: ; <no location info>: error:; Could not find module `Network.Socket'; It is not a module in the current program, or in any known package.
2022-03-30 01:21:00 +0200 <janus> i think you can do
2022-03-30 01:21:10 +0200 <janus> > tupleToHostAddress 1024 (0,0,0,0)
2022-03-30 01:21:11 +0200 <lambdabot> error:
2022-03-30 01:21:11 +0200 <lambdabot> Variable not in scope:
2022-03-30 01:21:11 +0200 <lambdabot> tupleToHostAddress :: t0 -> (a0, b0, c0, d0) -> t
2022-03-30 01:21:12 +0200hololeap(~hololeap@user/hololeap)
2022-03-30 01:21:38 +0200alx741(~alx741@host-181-198-243-150.netlife.ec)
2022-03-30 01:21:56 +0200 <seydar> > tupleToHostAddress (127, 0, 0, 1)
2022-03-30 01:21:58 +0200 <lambdabot> error:
2022-03-30 01:21:58 +0200 <lambdabot> Variable not in scope: tupleToHostAddress :: (a0, b0, c0, d0) -> t
2022-03-30 01:22:11 +0200 <seydar> janus: but you're correct, that works in ghci for me
2022-03-30 01:22:13 +0200zeenk(~zeenk@2a02:2f04:a313:d600:8d26:ec9f:3ff6:fc94) (Client Quit)
2022-03-30 01:22:33 +0200 <janus> yeah, each dot separated number is a word8 in haskell
2022-03-30 01:22:45 +0200 <seydar> ah interesting
2022-03-30 01:22:51 +0200 <janus> a Word8 is a byte, and an IPv4 address is 4 bytes
2022-03-30 01:24:02 +0200 <seydar> i hate that i now have to split my hostname
2022-03-30 01:24:14 +0200 <seydar> is this how everyone else is doing network ops, or am i doing something crazy?
2022-03-30 01:24:46 +0200 <janus> i think you are correct in that there is no platform-independent way to represent an IP address with its port
2022-03-30 01:25:02 +0200 <janus> consider that IPv6 also uses colons inside of it...
2022-03-30 01:25:08 +0200deadmarshal_(~deadmarsh@95.38.118.21)
2022-03-30 01:25:23 +0200 <janus> so i think it is simplest to just store the port separately of the address
2022-03-30 01:25:40 +0200 <seydar> i now understand the impetus behind haskell: we should all be pure and disabuse ourselves of IO
2022-03-30 01:26:12 +0200 <janus> many command line tools take the port number completely separately. somehow concatenating the address and the port is something you should only really need for URL's. but you're not dealing with URL's
2022-03-30 01:26:34 +0200 <janus> better not invent yet another encoding scheme that will break whenever you choose to add IPv6 support...
2022-03-30 01:26:38 +0200 <seydar> i'm storing the port separately, but now I have to write a splitter to split the hostname up on dots to turn it into a Word32
2022-03-30 01:26:43 +0200alx741(~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 260 seconds)
2022-03-30 01:28:13 +0200__monty__(~toonn@user/toonn) (Quit: leaving)
2022-03-30 01:28:20 +0200 <janus> you don't need to make a Word32 if you're using the function we talked about...
2022-03-30 01:28:42 +0200alx741(~alx741@host-181-198-243-150.netlife.ec)
2022-03-30 01:29:31 +0200Pickchea(~private@user/pickchea) (Quit: Leaving)
2022-03-30 01:29:38 +0200deadmarshal_(~deadmarsh@95.38.118.21) (Ping timeout: 260 seconds)
2022-03-30 01:29:38 +0200 <seydar> janus: my hostname comes in as a string
2022-03-30 01:30:22 +0200 <seydar> so i need to turn it into an IPv4 quadruple
2022-03-30 01:30:43 +0200acidjnk(~acidjnk@p200300d0c7049f4214af152190df7355.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2022-03-30 01:31:33 +0200 <Axman6> (,,,) <$> word8 <* char '.' <*> word8 <* char '.' <*> word8 <* char '.' <*> word8
2022-03-30 01:32:52 +0200boxscape_(~boxscape_@p4ff0b60b.dip0.t-ipconnect.de) (Quit: Connection closed)
2022-03-30 01:34:18 +0200alx741(~alx741@host-181-198-243-150.netlife.ec) (Ping timeout: 260 seconds)
2022-03-30 01:34:41 +0200 <janus> you can also do it without attoparsec: do { [a,b,c,d] <- pure $ splitOn "." "127.0.0.1"; (,,,) <$> readMaybe a <*> readMaybe b <*> readMaybe c <*> readMaybe d } :: Maybe (Word8,Word8,Word8,Word8)
2022-03-30 01:35:16 +0200 <janus> @package split
2022-03-30 01:35:16 +0200 <lambdabot> https://hackage.haskell.org/package/split
2022-03-30 01:36:39 +0200alx741(~alx741@host-181-198-243-150.netlife.ec)
2022-03-30 01:37:42 +0200alx741(~alx741@host-181-198-243-150.netlife.ec) (Client Quit)
2022-03-30 01:37:53 +0200 <janus> seydar: btw when you say 'hostname' that makes it sound like you're using dns (to me at least). but it seems like you're not
2022-03-30 01:37:55 +0200mvk(~mvk@2607:fea8:5cc3:7e00::7980)
2022-03-30 01:40:29 +0200rawley(~rawley@216-197-141-102.nbfr.hsdb.sasknet.sk.ca)
2022-03-30 01:42:32 +0200 <janus> seydar: btw SockAddrUnix needs to be used with a path to a unix socket which exists on your filesystem. you can't just plug an IP address in there
2022-03-30 01:43:45 +0200 <janus> ok, i am not 100% sure it needs to exist since there may also be a way to create unix sockets with this type. but IP address is wrong for sure
2022-03-30 01:44:09 +0200 <geekosaur> it should *not* exist, if you're intending to listen on it
2022-03-30 01:44:57 +0200 <janus> all right, makes sense
2022-03-30 01:45:33 +0200 <geekosaur> but yes, SockAddrUnix is an AF_UNIX socket represented by an object of filetype 's' in the filesystem, not an IP address. you want SockAddrInet
2022-03-30 01:45:58 +0200 <janus> does windows have Unix sockets?
2022-03-30 01:47:04 +0200 <hpc> no
2022-03-30 01:47:12 +0200 <janus> oh seems like it does https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/
2022-03-30 01:47:27 +0200 <hpc> wuh?
2022-03-30 01:47:35 +0200 <janus> even using winsock, it says
2022-03-30 01:47:45 +0200 <monochrom> Still, the haskell library package may not know about it.
2022-03-30 01:49:33 +0200 <geekosaur> haskell tries to supportolder versions of windows as well, so probably it doesn't
2022-03-30 01:52:11 +0200 <seydar> janus: damn, now i need to install Data.List.Split in order to use splitOn
2022-03-30 01:52:17 +0200 <seydar> this is too much for one day, i'll try again tomorrow
2022-03-30 01:52:25 +0200seydar(~seydar@154-27-113-252.starry-inc.net) (Quit: leaving)
2022-03-30 01:52:53 +0200 <janus> seydar: it's very useful to know how to install libraries though. but see you tomorrow, good night
2022-03-30 01:54:15 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 240 seconds)
2022-03-30 02:02:29 +0200alp(~alp@user/alp)
2022-03-30 02:09:24 +0200mvk(~mvk@2607:fea8:5cc3:7e00::7980) (Ping timeout: 240 seconds)
2022-03-30 02:19:27 +0200xkuru(~xkuru@user/xkuru) (Read error: Connection reset by peer)
2022-03-30 02:20:17 +0200xkuru(~xkuru@user/xkuru)
2022-03-30 02:20:21 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net)
2022-03-30 02:24:34 +0200xff0x(~xff0x@i121-117-52-147.s41.a013.ap.plala.or.jp) (Ping timeout: 246 seconds)
2022-03-30 02:25:19 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Ping timeout: 260 seconds)
2022-03-30 02:26:51 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2022-03-30 02:29:19 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
2022-03-30 02:33:22 +0200machinedgod(~machinedg@24.105.81.50) (Ping timeout: 260 seconds)
2022-03-30 02:34:36 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net)
2022-03-30 02:34:51 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-03-30 02:39:09 +0200zebrag(~chris@user/zebrag)
2022-03-30 02:40:47 +0200xcmw(~textual@dyn-72-33-2-250.uwnet.wisc.edu) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2022-03-30 02:44:43 +0200k8yun(~k8yun@user/k8yun)
2022-03-30 02:46:47 +0200gurkenglas(~gurkengla@dslb-178-012-018-212.178.012.pools.vodafone-ip.de) (Ping timeout: 260 seconds)
2022-03-30 02:47:24 +0200 <zebrag> "The pioneer string-processing language SNOBOL (1962)" (https://en.wikipedia.org/wiki/Backtracking)
2022-03-30 02:47:48 +0200obfusk(~quassel@a82-161-150-56.adsl.xs4all.nl) (Ping timeout: 240 seconds)
2022-03-30 02:48:19 +0200obfusk(~quassel@77-172-60-123.fixed.kpn.net)
2022-03-30 02:49:26 +0200 <zebrag> Do you know why "continuation" would be used for backtracking? I mean "continuation" is often used in relation with backtracking sort of parsers.
2022-03-30 02:52:27 +0200 <zebrag> With monadic parsers, one of the important point is that list-monad can be used for backtracking. But I've never found why "continuation" is used in relation with parsers.
2022-03-30 02:52:56 +0200 <abastro[m]> Becuz monad is continuation with effects
2022-03-30 02:53:01 +0200 <abastro[m]> Or wait, what was the term
2022-03-30 02:53:24 +0200 <zebrag> I wait
2022-03-30 02:54:12 +0200 <abastro[m]> A monad is just submonad of continuation
2022-03-30 02:55:13 +0200 <abastro[m]> That is, if you have continuations and state, you can simulate any functional monad.
2022-03-30 02:55:45 +0200 <c_wraith> zebrag: continuations in parsers are mostly used for efficiency
2022-03-30 02:56:06 +0200 <zebrag> there is that too
2022-03-30 02:56:12 +0200 <abastro[m]> If you think about `a -> m b`, it is sort of continuation after `a`
2022-03-30 02:56:38 +0200 <abastro[m]> But yea continuation is efficient in that application too
2022-03-30 03:00:48 +0200 <c_wraith> like, you can find a non-continuation encoding of what most parser monads are doing, I'm sure. But they'll end up doing a lot more pattern matching on ADTs, which is a lot slower of an operation than just passing around extra parameters which function as continuations for the exceptional cases
2022-03-30 03:03:06 +0200xff0x(~xff0x@125x102x200x106.ap125.ftth.ucom.ne.jp)
2022-03-30 03:03:14 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-03-30 03:03:25 +0200 <zebrag> yes, looking into that
2022-03-30 03:03:35 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds)
2022-03-30 03:03:36 +0200mud(~mud@user/kadoban)
2022-03-30 03:06:20 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Quit: WeeChat 3.4.1)
2022-03-30 03:07:37 +0200abhixec(~abhixec@c-67-169-139-16.hsd1.ca.comcast.net)
2022-03-30 03:07:38 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-03-30 03:10:29 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2022-03-30 03:16:34 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-03-30 03:16:36 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2022-03-30 03:20:48 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-03-30 03:20:48 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-03-30 03:20:48 +0200wroathe(~wroathe@user/wroathe)
2022-03-30 03:21:08 +0200DNH(~DNH@2a02:8108:1100:16d8:61e3:f551:d48e:e2b3) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2022-03-30 03:21:20 +0200neurocyte86(~neurocyte@IP-094046070123.dynamic.medianet-world.de)
2022-03-30 03:21:20 +0200neurocyte86(~neurocyte@IP-094046070123.dynamic.medianet-world.de) (Changing host)
2022-03-30 03:21:20 +0200neurocyte86(~neurocyte@user/neurocyte)
2022-03-30 03:23:31 +0200neurocyte8(~neurocyte@user/neurocyte) (Ping timeout: 256 seconds)
2022-03-30 03:23:31 +0200neurocyte86neurocyte8
2022-03-30 03:28:37 +0200Chargen(~chargen@8.21.8.253) (Quit: Leaving)
2022-03-30 03:30:23 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-03-30 03:34:55 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Ping timeout: 246 seconds)
2022-03-30 03:35:07 +0200alp(~alp@user/alp) (Ping timeout: 250 seconds)
2022-03-30 03:37:16 +0200Mxfromagna(~Mxfromagn@mob-5-90-109-174.net.vodafone.it)
2022-03-30 03:37:22 +0200chenqisu1(~chenqisu1@183.217.200.168)
2022-03-30 03:39:09 +0200Mxfromagna(~Mxfromagn@mob-5-90-109-174.net.vodafone.it) (Client Quit)
2022-03-30 03:39:25 +0200 <Axman6> Is it fair to say that, at least in GHC, continuation passing basically lets you pass in a target for a goto? It's literally just a jump in the compiled code right?
2022-03-30 03:41:25 +0200ProfSimm(~ProfSimm@87.227.196.109) (Remote host closed the connection)
2022-03-30 03:42:37 +0200 <abastro[m]> I wonder if it works that way in GHC's STG
2022-03-30 03:43:39 +0200 <Axman6> I believe it does, a function call is just a jump to that function
2022-03-30 03:46:20 +0200justsomeguy(~justsomeg@user/justsomeguy)
2022-03-30 04:02:48 +0200Benzi-Junior(~BenziJuni@dsl-149-64-179.hive.is) (Quit: ZNC 1.8.2 - https://znc.in)
2022-03-30 04:03:37 +0200_xor(~xor@74.215.232.169)
2022-03-30 04:06:10 +0200nosewings(~ngpc@2603-8081-3e05-e2d0-ab92-d9c1-c016-553e.res6.spectrum.com) (Remote host closed the connection)
2022-03-30 04:06:49 +0200xcmw(~textual@dyn-72-33-2-250.uwnet.wisc.edu)
2022-03-30 04:10:56 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2022-03-30 04:10:56 +0200lumberjack123(~alMalsamo@gateway/tor-sasl/almalsamo) (Remote host closed the connection)
2022-03-30 04:11:40 +0200zyklotomic(~ethan@res380d-128-61-83-149.res.gatech.edu) (Ping timeout: 246 seconds)
2022-03-30 04:11:52 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-03-30 04:12:15 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 256 seconds)
2022-03-30 04:12:25 +0200_xor(~xor@74.215.232.169) (Quit: WeeChat 3.4.1)
2022-03-30 04:12:47 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-03-30 04:12:47 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-03-30 04:12:47 +0200wroathe(~wroathe@user/wroathe)
2022-03-30 04:13:40 +0200zyklotomic(~ethan@r4-128-61-93-8.res.gatech.edu)
2022-03-30 04:14:10 +0200alMalsamo(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-03-30 04:14:15 +0200alMalsamolumberjack123
2022-03-30 04:19:55 +0200Guest|18(~Guest|18@116.21.1.31)
2022-03-30 04:23:13 +0200 <Guest|18> :)
2022-03-30 04:23:21 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net)
2022-03-30 04:24:15 +0200 <Axman6> We currently don't have any way to define types which contain an unpacked array of a known size do we? I'd love to be able to do data Tree n k v = Empty | Leaf k v | Node {-#UNPACK#-} (Vec n (Tree n k v))
2022-03-30 04:25:15 +0200AlexNoo_(~AlexNoo@178.34.151.158)
2022-03-30 04:27:24 +0200AlexZenon(~alzenon@94.233.240.35) (Ping timeout: 240 seconds)
2022-03-30 04:27:24 +0200Alex_test(~al_test@94.233.240.35) (Ping timeout: 240 seconds)
2022-03-30 04:28:06 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Ping timeout: 272 seconds)
2022-03-30 04:28:37 +0200AlexNoo(~AlexNoo@94.233.240.35) (Ping timeout: 240 seconds)
2022-03-30 04:28:52 +0200xkuru(~xkuru@user/xkuru) (Read error: Connection reset by peer)
2022-03-30 04:33:13 +0200 <abastro[m]> Unpacked array? What is that?
2022-03-30 04:33:17 +0200 <abastro[m]> Oh
2022-03-30 04:33:29 +0200 <abastro[m]> Like Vector.Unboxed but dependently sized?
2022-03-30 04:33:38 +0200Alex_test(~al_test@178.34.151.158)
2022-03-30 04:34:13 +0200AlexZenon(~alzenon@178.34.151.158)
2022-03-30 04:37:23 +0200dsrt^(~dsrt@96-91-136-49-static.hfc.comcastbusiness.net) (Ping timeout: 260 seconds)
2022-03-30 04:38:53 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
2022-03-30 04:38:53 +0200finn_elija(~finn_elij@user/finn-elija/x-0085643)
2022-03-30 04:38:53 +0200finn_elijaFinnElija
2022-03-30 04:45:19 +0200Typedfern(~Typedfern@220.red-83-56-165.dynamicip.rima-tde.net) (Ping timeout: 260 seconds)
2022-03-30 04:49:16 +0200raym(~raym@user/raym) (Quit: kernel update, rebooting...)
2022-03-30 04:49:59 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 256 seconds)
2022-03-30 04:50:52 +0200raym(~raym@user/raym)
2022-03-30 04:54:04 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-03-30 04:59:04 +0200slim(uid300876@id-300876.lymington.irccloud.com)
2022-03-30 04:59:44 +0200cdman(~dcm@27.2.218.248)
2022-03-30 04:59:44 +0200cdman(~dcm@27.2.218.248) (Changing host)
2022-03-30 04:59:44 +0200cdman(~dcm@user/dmc/x-4369397)
2022-03-30 04:59:51 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 256 seconds)
2022-03-30 04:59:59 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
2022-03-30 05:01:58 +0200Typedfern(~Typedfern@73.red-83-57-140.dynamicip.rima-tde.net)
2022-03-30 05:05:16 +0200slim_(uid300876@id-300876.lymington.irccloud.com)
2022-03-30 05:07:48 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net)
2022-03-30 05:07:59 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-03-30 05:07:59 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-03-30 05:07:59 +0200wroathe(~wroathe@user/wroathe)
2022-03-30 05:13:42 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 272 seconds)
2022-03-30 05:17:43 +0200lavaman(~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Remote host closed the connection)
2022-03-30 05:17:55 +0200lavaman(~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
2022-03-30 05:21:43 +0200mbuf(~Shakthi@136.185.73.48)
2022-03-30 05:25:57 +0200aeka(~aeka@user/hiruji) (Ping timeout: 240 seconds)
2022-03-30 05:27:58 +0200zebrag(~chris@user/zebrag) (Quit: Konversation terminated!)
2022-03-30 05:28:33 +0200aeka(~aeka@user/hiruji)
2022-03-30 05:34:36 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 272 seconds)
2022-03-30 05:56:12 +0200notzmv(~zmv@user/notzmv) (Ping timeout: 268 seconds)
2022-03-30 05:58:47 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Remote host closed the connection)
2022-03-30 05:59:57 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net)
2022-03-30 06:00:23 +0200nate1(~nate@98.45.167.61)
2022-03-30 06:00:24 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Read error: Connection reset by peer)
2022-03-30 06:00:53 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net)
2022-03-30 06:02:31 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 256 seconds)
2022-03-30 06:02:51 +0200rawley(~rawley@216-197-141-102.nbfr.hsdb.sasknet.sk.ca) (Remote host closed the connection)
2022-03-30 06:03:10 +0200abhixec(~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Quit: leaving)
2022-03-30 06:04:28 +0200notzmv(~zmv@user/notzmv)
2022-03-30 06:04:43 +0200nate1(~nate@98.45.167.61) (Ping timeout: 246 seconds)
2022-03-30 06:06:40 +0200deadmarshal_(~deadmarsh@95.38.118.21)
2022-03-30 06:08:10 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Remote host closed the connection)
2022-03-30 06:09:11 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net)
2022-03-30 06:09:41 +0200hgolden(~hgolden2@cpe-172-251-233-141.socal.res.rr.com)
2022-03-30 06:13:13 +0200whatsupdoc(uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
2022-03-30 06:14:18 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Ping timeout: 260 seconds)
2022-03-30 06:25:19 +0200vicfred(~vicfred@user/vicfred)
2022-03-30 06:30:25 +0200ystael(~ystael@user/ystael) (Read error: Connection reset by peer)
2022-03-30 06:34:03 +0200ystael(~ystael@user/ystael)
2022-03-30 06:37:04 +0200ChaiTRex(~ChaiTRex@user/chaitrex) (Quit: ChaiTRex)
2022-03-30 06:37:39 +0200ChaiTRex(~ChaiTRex@user/chaitrex)
2022-03-30 06:39:53 +0200bitmapper(uid464869@id-464869.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2022-03-30 06:48:08 +0200xcmw(~textual@dyn-72-33-2-250.uwnet.wisc.edu) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2022-03-30 06:51:02 +0200EsoAlgo(~EsoAlgo@152.70.142.52) (Quit: The Lounge - https://thelounge.chat)
2022-03-30 06:51:38 +0200benin(~benin@183.82.24.110)
2022-03-30 06:52:41 +0200EsoAlgo(~EsoAlgo@152.70.142.52)
2022-03-30 07:13:56 +0200 <Axman6> abastro[m]: not quite, more that the array itself would be unpackable into the structure, Tree 8 k v would have nodes that are smaller than Tree 16 k v because the array is like having another 8/16 fields in the constructor
2022-03-30 07:14:41 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net)
2022-03-30 07:18:22 +0200 <abastro[m]> So basically vector without indirection?
2022-03-30 07:18:40 +0200 <abastro[m]> I thought unpacked data fields are for that
2022-03-30 07:18:49 +0200 <Axman6> yeah - whether the values inside are boxed or not is another consideration
2022-03-30 07:19:20 +0200danso(~danso@danso.ca)
2022-03-30 07:19:44 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Ping timeout: 272 seconds)
2022-03-30 07:20:30 +0200 <abastro[m]> I guess encoding of the Vector library might be important then
2022-03-30 07:20:43 +0200 <Axman6> ideally you could have an unboxed array of unboxed values - similar to C's struct foo { size_t len; uint8_t vec[];} which allows the vec to hang off the end of the struct
2022-03-30 07:20:48 +0200Unicorn_Princess(~Unicorn_P@93-103-228-248.dynamic.t-2.net) (Remote host closed the connection)
2022-03-30 07:20:50 +0200 <abastro[m]> I think I am heard of unboxed vector
2022-03-30 07:20:55 +0200 <abastro[m]> I mean
2022-03-30 07:21:01 +0200 <abastro[m]> Unpacked vector.
2022-03-30 07:22:46 +0200deadmarshal_(~deadmarsh@95.38.118.21) (Ping timeout: 246 seconds)
2022-03-30 07:22:51 +0200 <danso> main = putStrLn "hello world" >> threadDelay 5000000
2022-03-30 07:23:06 +0200 <danso> this trivial program outputs "hello world" then waits 5 seconds before exiting
2022-03-30 07:23:21 +0200 <danso> unless i redirect stdout from the shell.
2022-03-30 07:23:22 +0200 <Axman6> normal Vector is like struct vec {size_t len; object *[] vals;} (array of pointers to some object) with unboxed being like struct vec {size_t len; uint64_t[] vals;}, an array of values directly in the array
2022-03-30 07:23:45 +0200 <danso> if i run ./helloworld > output.txt, nothing is written to output.txt until the program terminates
2022-03-30 07:23:59 +0200 <danso> sorry if this is not exactly a haskell question, but i don't even know where to begin looking
2022-03-30 07:24:29 +0200 <Axman6> yeah that's a buffering question
2022-03-30 07:25:00 +0200 <danso> i haven't found any other language implementations that have this behaviour; only GHC
2022-03-30 07:25:04 +0200 <Axman6> you can change the BufferingMode on the stdout handle to something like line buffered (I can't remember what the other choices are)
2022-03-30 07:25:16 +0200 <Axman6> @hoogle BufferingMode
2022-03-30 07:25:16 +0200 <lambdabot> No results found
2022-03-30 07:25:17 +0200 <monochrom> Ugh, this happens in C too.
2022-03-30 07:25:21 +0200 <Axman6> @hoogle BufferMode
2022-03-30 07:25:21 +0200 <lambdabot> System.IO data BufferMode
2022-03-30 07:25:21 +0200 <lambdabot> GHC.IO.Handle data BufferMode
2022-03-30 07:25:21 +0200 <lambdabot> GHC.IO.Handle.Types data BufferMode
2022-03-30 07:26:21 +0200 <monochrom> In fact I have great fun teasing^W teaching my student if in C you have printf("hello") then fork, why you will eventually see "hello" twice. :)
2022-03-30 07:26:47 +0200 <monochrom> Pretty sure all languages do this.
2022-03-30 07:26:49 +0200 <abastro[m]> Oh, the point about size having to be known is prob problematic
2022-03-30 07:26:50 +0200 <Axman6> damn handles
2022-03-30 07:27:22 +0200 <monochrom> Either that or someone would have complained "such low I/O performance, please reinstate block buffering"
2022-03-30 07:27:33 +0200 <danso> interesting monochrom, i just tested and you are correct
2022-03-30 07:27:52 +0200 <danso> i only tested shell (dash) and python, both of which behaved the way i expected
2022-03-30 07:28:09 +0200 <Axman6> changing the buffering mode for handles used for logging is something you pretty commonly want
2022-03-30 07:28:38 +0200 <monochrom> The shell command "foo > file" contains a close(stdout).
2022-03-30 07:29:02 +0200 <monochrom> Especially when foo is an executable.
2022-03-30 07:30:30 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
2022-03-30 07:32:32 +0200 <danso> thanks both, `hSetHandle stdout LineBuffering` was the fix i needed
2022-03-30 07:32:47 +0200 <danso> i'm going to have to dig deeper another time to learn more tho :^)
2022-03-30 07:32:58 +0200takuan(~takuan@178-116-218-225.access.telenet.be)
2022-03-30 07:33:13 +0200michalz(~michalz@185.246.204.107)
2022-03-30 07:33:27 +0200 <abastro[m]> I hate how my reply is somehow out of place because matrix bridge
2022-03-30 07:33:55 +0200 <monochrom> Come join the dark side ^W^W IRC >:)
2022-03-30 07:34:21 +0200 <monochrom> https://xkcd.com/1782/
2022-03-30 07:34:27 +0200k8yun(~k8yun@user/k8yun) (Quit: Leaving)
2022-03-30 07:34:36 +0200 <Axman6> There are only two chat protocols, IRC and whatever the falvour of the week is
2022-03-30 07:35:32 +0200 <Axman6> particularly when we have such a nice Haskell IRC client in glirc, there's no excuse (thanks glguy! <3)
2022-03-30 07:35:56 +0200 <abastro[m]> Haha
2022-03-30 07:36:15 +0200 <abastro[m]> nice haskell irc client?
2022-03-30 07:36:20 +0200 <abastro[m]> Which one?
2022-03-30 07:36:34 +0200 <Axman6> glirc
2022-03-30 07:36:49 +0200 <Axman6> @hackage glirc
2022-03-30 07:36:50 +0200 <lambdabot> https://hackage.haskell.org/package/glirc
2022-03-30 07:37:29 +0200 <abastro[m]> > Greater Long Island Running Group
2022-03-30 07:37:31 +0200 <lambdabot> error:
2022-03-30 07:37:31 +0200 <lambdabot> • Data constructor not in scope:
2022-03-30 07:37:31 +0200 <lambdabot> Greater :: t0 -> t1 -> t2 -> t3 -> t
2022-03-30 07:37:38 +0200 <abastro[m]> https://www.glirc.org/
2022-03-30 07:37:44 +0200 <abastro[m]> Hmm
2022-03-30 07:40:12 +0200dsrt^(~dsrt@96-91-136-49-static.hfc.comcastbusiness.net)
2022-03-30 07:41:53 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net)
2022-03-30 07:45:20 +0200Graham31415(~Graham@user/Graham31415)
2022-03-30 07:48:01 +0200 <abastro[m]> Oh, so there was a package named `glirc`
2022-03-30 08:04:33 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds)
2022-03-30 08:06:02 +0200 <abastro[m]> How do I automatically generate config file for glirc?
2022-03-30 08:08:07 +0200lumberjack123(~alMalsamo@gateway/tor-sasl/almalsamo) (Remote host closed the connection)
2022-03-30 08:08:13 +0200deadmarshal_(~deadmarsh@95.38.118.21)
2022-03-30 08:08:20 +0200lumberjack123(~alMalsamo@gateway/tor-sasl/almalsamo)
2022-03-30 08:08:23 +0200 <Axman6> I think I just copied one from the wiki on github - that's where all the docs are
2022-03-30 08:10:18 +0200 <abastro[m]> Personally I wish it were easier to use
2022-03-30 08:14:10 +0200 <Graham31415> operator associativity seems to always be explained by placing parentheses around an expression, as in (a+b)+c. I feel this is incomplete though. How should one interpret two operators of equal precendence, say opL with left associativity and opR with right associativity, in: a `opR` b `opL` c?
2022-03-30 08:14:36 +0200 <Axman6> as a parser error
2022-03-30 08:14:42 +0200ss-(~ss-@187.83.249.216.dyn.smithville.net)
2022-03-30 08:14:44 +0200 <Graham31415> So what is the non-parentheses explanation for operator associativity?
2022-03-30 08:15:43 +0200 <jackdk> % f <&> g >>> h
2022-03-30 08:15:43 +0200 <yahb> jackdk: ; <interactive>:14:1: error: Precedence parsing error cannot mix `<&>' [infixl 1] and `>>>' [infixr 1] in the same infix expression
2022-03-30 08:16:00 +0200 <Axman6> I feel like you've run into exactly the problem that definind precedence and associativity was built to solve, it's ambiguous, so what should the compiler do?
2022-03-30 08:16:39 +0200 <Axman6> it has to (consistently!) pick weither (a `opR` b) `opL c OR a `opR` (b `opL` c)
2022-03-30 08:16:43 +0200 <Graham31415> Thank you! Strangely, when operator associativity is explained this is never mentioned!
2022-03-30 08:16:44 +0200 <Axman6> either
2022-03-30 08:17:24 +0200 <abastro[m]> Due to the ambiguity of this situation, there is a school of thought that precedence is not ideal
2022-03-30 08:17:39 +0200 <Axman6> yeah I feel a lot of how this is taught is from the perspective of someone who's actually run into this problem before. If you haven't it's not obvious why you'd care
2022-03-30 08:17:57 +0200 <Axman6> need moar lisp or RPN
2022-03-30 08:17:59 +0200 <abastro[m]> Wait, I don't mean what I said
2022-03-30 08:18:01 +0200 <ss-> i'm trying to get profiling to work on a stack project I have, but I keep running into "Perhaps you haven't installed the profiling libraries for package `base-4.15.1.0`?". running stack build --profile with lts-19.1 after stack clean, stack clean --full, stack purge and nothing makes a difference. isn't stack supposed to know to reinstall
2022-03-30 08:18:01 +0200 <ss-> profiling versions or am I missing something here? do i have to delete the global ~/.stack to reset it?
2022-03-30 08:18:37 +0200 <Graham31415> I see that the common Haskell operators of a given precedence generally associate in the same direction, which makes much more sense now.
2022-03-30 08:18:49 +0200ProfSimm(~ProfSimm@87.227.196.109)
2022-03-30 08:20:05 +0200 <Axman6> yeah
2022-03-30 08:20:06 +0200 <ephemient> https://www.haskell.org/onlinereport/exps.html "Consecutive unparenthesized operators with the same precedence must both be either left or right associative to avoid a syntax error."
2022-03-30 08:21:27 +0200Graham31415adds the haskell report to his reading list
2022-03-30 08:22:41 +0200 <abastro[m]> I meant that ppl propose operators of same precedence to never mix together
2022-03-30 08:22:55 +0200 <abastro[m]> Like, not permitting `a + b + c`, instead always do `(a + b) + c`
2022-03-30 08:24:42 +0200 <Axman6> (+ a b c)
2022-03-30 08:24:53 +0200 <abastro[m]> a `opR` b `opL` c would also be similarly disallowed
2022-03-30 08:25:52 +0200califax(~califax@user/califx) (Remote host closed the connection)
2022-03-30 08:25:57 +0200 <ephemient> even if they're at different precedence levels?
2022-03-30 08:26:49 +0200califax(~califax@user/califx)
2022-03-30 08:27:22 +0200neurocyte8(~neurocyte@user/neurocyte) (Quit: The Lounge - https://thelounge.chat)
2022-03-30 08:27:43 +0200mncheck(~mncheck@193.224.205.254)
2022-03-30 08:27:50 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-03-30 08:28:23 +0200neurocyte86(~neurocyte@IP-094046070123.dynamic.medianet-world.de)
2022-03-30 08:28:24 +0200neurocyte86(~neurocyte@IP-094046070123.dynamic.medianet-world.de) (Changing host)
2022-03-30 08:28:24 +0200neurocyte86(~neurocyte@user/neurocyte)
2022-03-30 08:28:30 +0200 <abastro[m]> Oh, allowed if different precedence levels
2022-03-30 08:28:49 +0200 <abastro[m]> They'd like it only disallowed when same precedence levels, even for the same operator
2022-03-30 08:28:50 +0200 <ephemient> that's already how it works in Haskell then
2022-03-30 08:28:59 +0200 <abastro[m]> So no need to left/right specify?
2022-03-30 08:29:07 +0200 <ephemient> I mean no mixing left and right
2022-03-30 08:29:28 +0200 <Axman6> % :info (<$>)
2022-03-30 08:29:28 +0200 <yahb> Axman6: (<$>) :: Functor f => (a -> b) -> f a -> f b -- Defined in `Data.Functor'; infixl 4 <$>
2022-03-30 08:29:32 +0200 <Axman6> % :info (<*>)
2022-03-30 08:29:32 +0200 <yahb> Axman6: type Applicative :: (* -> *) -> Constraint; class Functor f => Applicative f where; ...; (<*>) :: f (a -> b) -> f a -> f b; ...; -- Defined in `GHC.Base'; infixl 4 <*>
2022-03-30 08:29:40 +0200 <Axman6> % :info (<&>)
2022-03-30 08:29:40 +0200 <yahb> Axman6: (<&>) :: Functor f => f a -> (a -> b) -> f b -- Defined in `Data.Functor'; infixl 1 <&>
2022-03-30 08:29:43 +0200 <Axman6> % :info (>>>)
2022-03-30 08:29:43 +0200 <yahb> Axman6: (>>>) :: forall {k} (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k). Category cat => cat a b -> cat b c -> cat a c -- Defined in `Control.Category'; infixr 1 >>>
2022-03-30 08:30:19 +0200 <ephemient> arithmetic is one thing, but having to parenthesize `a : b : c : _` would be pretty painful (fixity rules apply to pattern matching too)
2022-03-30 08:30:25 +0200ystael(~ystael@user/ystael) (Ping timeout: 256 seconds)
2022-03-30 08:30:48 +0200ystael(~ystael@user/ystael)
2022-03-30 08:32:53 +0200 <abastro[m]> I mean, yea they do propose `a : (b : (c : _))` being easier to understand
2022-03-30 08:34:25 +0200califax(~califax@user/califx) (Remote host closed the connection)
2022-03-30 08:35:24 +0200califax(~califax@user/califx)
2022-03-30 08:35:51 +0200 <ephemient> I suppose that is a consistent opinion at least...
2022-03-30 08:36:07 +0200shriekingnoise(~shrieking@201.231.16.156) (Quit: Quit)
2022-03-30 08:36:11 +0200califax(~califax@user/califx) (Remote host closed the connection)
2022-03-30 08:37:05 +0200odnes(~odnes@5-203-245-187.pat.nym.cosmote.net)
2022-03-30 08:37:06 +0200califax(~califax@user/califx)
2022-03-30 08:38:39 +0200ss-(~ss-@187.83.249.216.dyn.smithville.net) (Quit: Client closed)
2022-03-30 08:38:46 +0200euandreh(~euandreh@2804:14c:33:9fe5:9dda:4bff:cdb5:90b8) (Ping timeout: 260 seconds)
2022-03-30 08:38:53 +0200deadmarshal_(~deadmarsh@95.38.118.21) (Ping timeout: 252 seconds)
2022-03-30 08:39:09 +0200 <abastro[m]> Yep
2022-03-30 08:39:35 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 260 seconds)
2022-03-30 08:40:56 +0200 <abastro[m]> Let me clarify after 10 minutes
2022-03-30 08:47:05 +0200califax(~califax@user/califx) (Remote host closed the connection)
2022-03-30 08:48:06 +0200califax(~califax@user/califx)
2022-03-30 08:50:39 +0200mc47(~mc47@xmonad/TheMC47)
2022-03-30 08:50:52 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
2022-03-30 08:52:15 +0200jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-03-30 08:52:25 +0200 <abastro[m]> Well those ppl usually do not think much about patterns
2022-03-30 08:52:45 +0200 <abastro[m]> However, I think they would be okay with `a : (b : (c : _))`
2022-03-30 08:52:48 +0200 <abastro[m]> In the end, wouldn
2022-03-30 08:53:09 +0200 <abastro[m]> Wouldn't it as readable as lisp anyway?
2022-03-30 08:53:14 +0200 <abastro[m]> (If you get used to it)
2022-03-30 08:54:47 +0200fendor(~fendor@178.165.199.73.wireless.dyn.drei.com)
2022-03-30 08:56:03 +0200Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2022-03-30 08:56:14 +0200acidjnk(~acidjnk@p200300d0c7049f58501b6673664ff2c4.dip0.t-ipconnect.de)
2022-03-30 08:59:41 +0200jakalx(~jakalx@base.jakalx.net)
2022-03-30 09:05:52 +0200vysn(~vysn@user/vysn)
2022-03-30 09:06:30 +0200euandreh(~euandreh@191.181.59.160)
2022-03-30 09:14:59 +0200lavaman(~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Remote host closed the connection)
2022-03-30 09:15:26 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
2022-03-30 09:16:40 +0200Major_Biscuit(~MajorBisc@2a02:a461:129d:1:193d:75d8:745d:e91e)
2022-03-30 09:16:46 +0200Major_Biscuit(~MajorBisc@2a02:a461:129d:1:193d:75d8:745d:e91e) (Client Quit)
2022-03-30 09:21:49 +0200MajorBiscuit(~MajorBisc@c-001-013-026.client.tudelft.eduvpn.nl)
2022-03-30 09:23:53 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-03-30 09:25:50 +0200abastro(~abab9579@143.248.229.191)
2022-03-30 09:29:52 +0200Codaraxis_(~Codaraxis@user/codaraxis)
2022-03-30 09:31:03 +0200lavaman(~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
2022-03-30 09:32:06 +0200rembo10(~rembo10@main.remulis.com) (Quit: ZNC 1.8.2 - https://znc.in)
2022-03-30 09:33:00 +0200rembo10(~rembo10@main.remulis.com)
2022-03-30 09:33:30 +0200jonathanx_(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
2022-03-30 09:33:36 +0200 <abastro> splits libera:#haskell libera:#haskell-offtopic
2022-03-30 09:33:39 +0200Inst(~Liam@2601:6c4:4080:3f80:d8aa:2d89:2452:a45)
2022-03-30 09:33:40 +0200 <abastro> Oh sorry
2022-03-30 09:33:48 +0200Codaraxis(~Codaraxis@user/codaraxis) (Ping timeout: 260 seconds)
2022-03-30 09:34:04 +0200 <Inst> yo
2022-03-30 09:34:18 +0200 <Inst> can CPS be used to make it so that a function takes one argument by default, but CPS allows it to take multiple functions?
2022-03-30 09:34:29 +0200 <Inst> as an example case, i have a library that hooks me into tinyfiledialogs
2022-03-30 09:34:37 +0200 <Inst> the problem is that invoking its functions are a pain
2022-03-30 09:35:07 +0200 <abastro> Guess that should depend on what you mean by "making functions take one argument"
2022-03-30 09:35:22 +0200 <Inst> well, all haskell functions only take one argument
2022-03-30 09:35:38 +0200 <Inst> but the idea is that, say, i have filepathfinder *
2022-03-30 09:36:08 +0200 <Inst> CPS would have it be defaultpath (filepathfinder *) **
2022-03-30 09:36:32 +0200 <Inst> filepathfinder by default opens up a window, but the CPS version would allow me to pass an additional argument to filepathfinder
2022-03-30 09:36:52 +0200 <Inst> and the expression returned is a filepath
2022-03-30 09:36:58 +0200 <abastro> Hm, can you say the type of `filepathfinder`
2022-03-30 09:37:21 +0200lortabac(~lortabac@88.125.6.227)
2022-03-30 09:37:29 +0200 <abastro> Is it a library function?
2022-03-30 09:37:38 +0200 <Inst> IO FilePath
2022-03-30 09:37:50 +0200mikoto-chan(~mikoto-ch@213.177.151.239)
2022-03-30 09:37:52 +0200 <Inst> where FilePath = Text
2022-03-30 09:38:10 +0200 <abastro> `filepathfinder :: IO FilePath`?
2022-03-30 09:38:39 +0200dhouthoo(~dhouthoo@178-117-36-167.access.telenet.be)
2022-03-30 09:40:25 +0200 <Inst> yeah
2022-03-30 09:40:29 +0200 <abastro> Simply that just takes no parameter though
2022-03-30 09:40:41 +0200 <abastro> In fact, such `filepathfinder` is not even a function
2022-03-30 09:40:42 +0200 <Inst> i guess, but defaultpath (filepathfinder) *
2022-03-30 09:40:47 +0200 <Inst> IO action
2022-03-30 09:41:05 +0200 <Inst> filepathFinder is a wrapper around a function that takes 4 arguments
2022-03-30 09:41:07 +0200 <abastro> All you can do with the action is just running it.
2022-03-30 09:41:29 +0200 <abastro> Eh, what do you now mean by "wrapper around a function taking 4 arguments"
2022-03-30 09:41:38 +0200 <abastro> Oh wait, is this about a FFI binding?
2022-03-30 09:41:41 +0200 <Inst> it invokes the function, but with arguments
2022-03-30 09:41:42 +0200 <Inst> yeah
2022-03-30 09:41:46 +0200 <Inst> as ""
2022-03-30 09:41:48 +0200 <abastro> So that the library does not expose enough arguments?
2022-03-30 09:41:56 +0200 <Inst> the library exposes tons of arguments
2022-03-30 09:42:15 +0200 <abastro> Uhm, I mean the haskell side of the library
2022-03-30 09:42:18 +0200 <Inst> i just want to be able to run filepathfinder by default, with the default arguments being "" :: Text
2022-03-30 09:42:32 +0200 <Inst> openFileDialog "" "" "" ""
2022-03-30 09:42:41 +0200 <abastro> Oh, now I see
2022-03-30 09:42:44 +0200 <Inst> filepathFinder = openFileDialog "" "" "" ""
2022-03-30 09:42:52 +0200 <abastro> So you want to call e.g. `openFileDialong "" "" "" ""`
2022-03-30 09:43:06 +0200 <abastro> but that's, you know, not easy to use - that is what you mean?
2022-03-30 09:43:12 +0200 <Inst> I want to see if I can set it up so a syntax of startingPath filepathFinder equals openFileDialog with the startingPath field filled out
2022-03-30 09:43:34 +0200 <abastro> In my case, I just write function for that
2022-03-30 09:43:35 +0200 <Inst> openFileDialog is in the lib, which has FFI built for it
2022-03-30 09:43:54 +0200 <abastro> Like, filepathfinder foo = openFileDialog "bar" "baz" foo "meh"
2022-03-30 09:43:57 +0200 <Inst> startingPath openFileDialog * is ergonomic enough
2022-03-30 09:44:28 +0200 <abastro> Then, use your `filepathfinder` afterwards
2022-03-30 09:44:33 +0200 <Inst> hmmm
2022-03-30 09:44:54 +0200 <Inst> trying to figure out how to get openFileDialog to work without any arguments, as well as with some arguments imposed on it by a larger function
2022-03-30 09:44:56 +0200 <Inst> it's not that hard, tbh
2022-03-30 09:45:04 +0200 <Inst> use pattern matching to check cases
2022-03-30 09:45:06 +0200 <Inst> but it's rather ugly
2022-03-30 09:46:39 +0200 <abastro> Wait, pattern matching? How does pattern matching work here?
2022-03-30 09:48:27 +0200machinedgod(~machinedg@24.105.81.50)
2022-03-30 09:48:58 +0200 <abastro> Also, I wonder how much familiar you are with haskell
2022-03-30 09:49:31 +0200 <Inst> why?
2022-03-30 09:49:45 +0200troydm(~troydm@host-176-37-124-197.b025.la.net.ua) (Ping timeout: 256 seconds)
2022-03-30 09:50:29 +0200 <abastro> I mean, are you fairly familiar with haskell, or are you an intermediate haskeller?
2022-03-30 09:50:56 +0200 <Inst> beginner / intermediate
2022-03-30 09:51:02 +0200 <abastro> Because it is a bit hard to understand what you want
2022-03-30 09:51:07 +0200 <abastro> Ah, so you are intermediate
2022-03-30 09:51:11 +0200 <[exa]> Inst: if I get it right, you're trying to have the filepathFinder work with varying number of arguments?
2022-03-30 09:51:14 +0200dschrempf(~dominik@070-207.dynamic.dsl.fonira.net)
2022-03-30 09:51:15 +0200 <Inst> yeah
2022-03-30 09:51:44 +0200 <Inst> with the structure being used to have the function be fed as an argument to another function in order to have multiple arguments
2022-03-30 09:51:49 +0200 <Inst> by itself it has no arguments
2022-03-30 09:51:49 +0200cfricke(~cfricke@user/cfricke)
2022-03-30 09:51:55 +0200 <abastro> Oh. Perhaps I am just not good at reading
2022-03-30 09:52:39 +0200 <abastro> So, you mean you want to make it work for both `filepathfinder "foo"` and `filepathfinder "foo" "bar"`?
2022-03-30 09:52:54 +0200 <[exa]> Inst: yes that can be done except patternmatching alone is not sufficient (parameter count for patternmatching is completely static, no matter what you match)
2022-03-30 09:53:16 +0200 <[exa]> Inst: it can be done with a simple typeclass though that allows the typesystem to decide how many parameters the filepathfinder actually takes
2022-03-30 09:53:35 +0200 <Inst> i think it can be done via pattern matching
2022-03-30 09:53:54 +0200 <Inst> let shell1function = actualfunction "" "" "" ""
2022-03-30 09:53:58 +0200 <abastro> Well, pattern matching only works with specified types
2022-03-30 09:54:37 +0200 <Inst> then argumentfeeder arg, if it meets shell function, turns it into actualfunction "" arg "" ""
2022-03-30 09:54:40 +0200 <abastro> So you cannot have both `fn "foo" "bar"` and `fn "foo"` working with pattern matching.
2022-03-30 09:54:51 +0200 <[exa]> Inst: you can't patternmatch different counts of arguments (first the types won't match, and it's also forbidden explicitly for some reasonable reason)
2022-03-30 09:54:54 +0200 <abastro> Oh wait
2022-03-30 09:55:17 +0200 <abastro> Hm yea, that would not work without typeclass
2022-03-30 09:55:18 +0200 <[exa]> Inst: have a look at `printf` package where they do basically the same :]
2022-03-30 09:55:35 +0200 <abastro> Though there is another way to simulate these kinds of parameters
2022-03-30 09:56:17 +0200 <abastro> Like `someFunction def { foo = "foo", bar = "bar" }`
2022-03-30 09:56:33 +0200 <Inst> i could always dummy it out, like, force the function to include _ in the calling
2022-03-30 09:56:52 +0200 <[exa]> Inst: the other way is to have a monoid for argument types, like optparse-applicative does
2022-03-30 09:56:55 +0200 <abastro> And you define `def` like `def = FooRecord { foo = "", bar = "", baz = "", baq = "" }`
2022-03-30 09:57:07 +0200benin(~benin@183.82.24.110) (Ping timeout: 246 seconds)
2022-03-30 09:57:11 +0200 <[exa]> I'd say optparse is in fact very nice
2022-03-30 09:57:13 +0200 <abastro> Monoid also works well with arguments
2022-03-30 09:57:57 +0200slim_(uid300876@id-300876.lymington.irccloud.com) ()
2022-03-30 09:59:27 +0200 <[exa]> Inst: is there any "semantics" for the arguments/argument in your var-arg function?
2022-03-30 10:03:24 +0200 <Andrew> Anyone has a beginner-friendly guide for doing socket programming?
2022-03-30 10:03:33 +0200 <Andrew> Especially TCP
2022-03-30 10:03:52 +0200 <[exa]> Andrew: 1] brace for impact
2022-03-30 10:04:04 +0200troydm(~troydm@host-176-37-124-197.b025.la.net.ua)
2022-03-30 10:04:11 +0200 <abastro> wh
2022-03-30 10:04:26 +0200 <Andrew> Well, I certainlly do have the flight data recorder
2022-03-30 10:05:00 +0200 <Inst> [exa] sort of
2022-03-30 10:05:03 +0200 <Inst> i'll have to look it up
2022-03-30 10:05:46 +0200zeenk(~zeenk@2a02:2f04:a313:d600:8d26:ec9f:3ff6:fc94)
2022-03-30 10:06:09 +0200Hemmo(Hemmo@eduroam-252-47.uta.fi)
2022-03-30 10:06:24 +0200 <Andrew> https://hackage.haskell.org/package/network-3.1.1.1/docs/Network-Socket.html, interesting
2022-03-30 10:06:38 +0200 <[exa]> Andrew: anyway I wanted to say that either it's super simple (you use haskell to abstract yourself from all the blocking&polling and use the TCP socket literally as a file handle or stdin/stdout), OR pretty complicated (you write the polling yourself and explode from the amount of possibilities the stuff can go wrong)
2022-03-30 10:07:15 +0200 <Andrew> Got it
2022-03-30 10:07:17 +0200 <abastro> Btw what is the role of optparse? I thought it was for parsing command arguments
2022-03-30 10:07:27 +0200 <abastro> Apparently it isn't, I guess
2022-03-30 10:08:38 +0200 <[exa]> the first approach is recommended; the only extra thing you need to know is that the TCP sockets have addresses instead of filenames (you can get them from hostnames using `getAddrInfo`), and you open the communication channels using `socket->bind->listen->accept` on the server side and `socket->connect` on the client side
2022-03-30 10:08:49 +0200alp(~alp@user/alp)
2022-03-30 10:10:06 +0200 <Andrew> [exa]: Thanks
2022-03-30 10:10:31 +0200 <Andrew> One of the other issues quite specific to me is that before, I've only looked at the mathematical and CS side of Haskell, I haven't looked at the practical side
2022-03-30 10:10:47 +0200 <Andrew> So what's happening here is I don't know how to debug issues with things like "I can't find this library"
2022-03-30 10:11:11 +0200 <[exa]> Andrew: btw it's pretty easy with haskell to make a tiny terminal server that people can connect to using telnet, for example this is a "painting server" I gave to students last time https://github.com/exaexa/hs21/blob/master/u3/paintserver.hs (they had to write the client for homework)
2022-03-30 10:11:42 +0200 <abastro> "Can't find library"? e.g. when setting up through cabal?
2022-03-30 10:11:47 +0200 <[exa]> Andrew: with simple technical questions usually just posting/pastebinning the error here (depending on length) will get you a quick solution :D
2022-03-30 10:11:52 +0200 <Andrew> https://hackage.haskell.org/package/network-3.1.1.1/docs/Network-Socket.html ... the server program on here, when I try to compiule it, says that variables gracefulClose and withFdSocket are not in scope
2022-03-30 10:11:59 +0200 <Andrew> k
2022-03-30 10:12:15 +0200tiferrei2000(~tiferrei@user/tiferrei) (Ping timeout: 240 seconds)
2022-03-30 10:12:21 +0200 <Andrew> https://lib.andrewyu.org/public/echo-serv.hs
2022-03-30 10:12:47 +0200 <Andrew> and output: termbin.com/bie9l
2022-03-30 10:13:23 +0200 <[exa]> what's the version of network package you have installed? seems like the 2 functions are fairly new
2022-03-30 10:13:48 +0200 <[exa]> if you have cabal file around, make sure you explicitly depend on a version newer than 3.1 (see the notes in the docs there)
2022-03-30 10:13:48 +0200 <Andrew> ghc 8.10.4, not sure how I check any packages
2022-03-30 10:14:01 +0200cosimone(~user@93-44-187-176.ip98.fastwebnet.it)
2022-03-30 10:14:12 +0200Inst(~Liam@2601:6c4:4080:3f80:d8aa:2d89:2452:a45) (Ping timeout: 240 seconds)
2022-03-30 10:14:17 +0200Andrewtries cabal install Network
2022-03-30 10:14:24 +0200 <Andrew> s/N/n/
2022-03-30 10:14:31 +0200 <Andrew> Ok, I do need an update
2022-03-30 10:14:33 +0200 <Andrew> Thanks :)
2022-03-30 10:14:35 +0200 <[exa]> yes that might help
2022-03-30 10:14:44 +0200dschrempf(~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.4.1)
2022-03-30 10:14:56 +0200 <[exa]> `ghc-pkg describe somepackage` can help with checking the versions
2022-03-30 10:15:06 +0200 <abastro> IIRC using `cabal install` to install a library is not ideal
2022-03-30 10:15:14 +0200Midjak(~Midjak@82.66.147.146)
2022-03-30 10:15:25 +0200Inst(~Liam@2601:6c4:4080:3f80:e47a:f359:ed75:db12)
2022-03-30 10:15:40 +0200 <abastro> Usually better to handle package with .cabal file
2022-03-30 10:16:00 +0200 <[exa]> Andrew: you might need to add `cabal install --lib network` if you are installing them "globally". Managing the packages locally for each project is a bit better as abastro says
2022-03-30 10:16:01 +0200 <Andrew> abastro: That's what I expected to work, but why?
2022-03-30 10:16:07 +0200 <Andrew> Oh I do need --lib
2022-03-30 10:16:25 +0200desklamp[m](~desklampm@2001:470:69fc:105::77b8)
2022-03-30 10:16:28 +0200tiferrei(~tiferrei@user/tiferrei)
2022-03-30 10:16:29 +0200 <Andrew> k
2022-03-30 10:17:04 +0200 <Andrew> k, thanks! Now at least I got the libraries worked out
2022-03-30 10:17:32 +0200 <[exa]> for starting "realistic programming", this is incredibly useful: https://wiki.haskell.org/How_to_write_a_Haskell_program
2022-03-30 10:18:04 +0200 <Andrew> Thank you!
2022-03-30 10:18:53 +0200 <abastro> The link includes `cabal sandbox init` tho..
2022-03-30 10:19:08 +0200 <abastro> Or is it quite usable?
2022-03-30 10:19:09 +0200 <[exa]> Inst: about the arguments, the main question there is whether it's just a "bunch of strings" that is expandable infinitely, or each of them has a specified semantics (like 'from' and 'to' and 'username' or so), which should probably drive the actual API implementation
2022-03-30 10:19:36 +0200 <Inst> specified semantics
2022-03-30 10:19:45 +0200 <abastro> wow, sandbox in cabal. Interesting
2022-03-30 10:19:49 +0200 <merijn> abastro: cabal sandbox is pretty much deprecated
2022-03-30 10:19:53 +0200 <abastro> Ouch
2022-03-30 10:19:54 +0200 <[exa]> yeah explicit sandboxes were a thing
2022-03-30 10:19:57 +0200 <merijn> abastro: It's completely obsolete
2022-03-30 10:19:57 +0200 <abastro> Yea, as expected..
2022-03-30 10:20:04 +0200 <abastro> Does cabal always sandbox now?
2022-03-30 10:20:15 +0200 <merijn> abastro: Yes, no, maybe, depends on your point of view
2022-03-30 10:20:44 +0200 <[exa]> it uses nix-style builds, everything is sufficiently isolated by default so sandboxes are usually only required for technical reasons
2022-03-30 10:20:55 +0200 <abastro> Oh, so it was practically overhaul-ed
2022-03-30 10:20:59 +0200 <[exa]> hm, how do I edit the haskell wiki? just register and go?
2022-03-30 10:21:23 +0200 <[exa]> abastro: yes, afaik that was the bigest deal in updating from cabal 1 to 2
2022-03-30 10:21:33 +0200 <abastro> https://cabal.readthedocs.io/en/3.6/getting-started.html might be better
2022-03-30 10:23:15 +0200tiferrei(~tiferrei@user/tiferrei) (Ping timeout: 240 seconds)
2022-03-30 10:25:00 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-03-30 10:25:19 +0200gurkenglas(~gurkengla@dslb-178-012-018-212.178.012.pools.vodafone-ip.de)
2022-03-30 10:27:11 +0200tiferrei(~tiferrei@user/tiferrei)
2022-03-30 10:28:35 +0200stiell_(~stiell@gateway/tor-sasl/stiell) (Ping timeout: 240 seconds)
2022-03-30 10:29:06 +0200stiell_(~stiell@gateway/tor-sasl/stiell)
2022-03-30 10:29:09 +0200 <Andrew> How do I turn ByteString into a String ([char])?
2022-03-30 10:29:15 +0200 <Andrew> s/c/C/
2022-03-30 10:29:44 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 272 seconds)
2022-03-30 10:30:32 +0200 <abastro> @hoogle ByteString -> String
2022-03-30 10:30:32 +0200 <lambdabot> Control.Lens.Internal.ByteString unpackStrict8 :: ByteString -> String
2022-03-30 10:30:32 +0200 <lambdabot> Control.Lens.Internal.ByteString unpackLazy8 :: ByteString -> String
2022-03-30 10:30:32 +0200 <lambdabot> Data.ByteString.Lazy.UTF8 toString :: ByteString -> String
2022-03-30 10:30:54 +0200 <abastro> Typically through `toString`, I guess.
2022-03-30 10:32:49 +0200 <dminuoso> Andrew: That action requires decoding.
2022-03-30 10:32:57 +0200 <dminuoso> ByteString is sadly poorly named
2022-03-30 10:33:07 +0200 <abastro> Oh wait
2022-03-30 10:33:08 +0200 <dminuoso> ByteBuffer might have been a better term
2022-03-30 10:33:16 +0200 <abastro> Duh I almost forgot that
2022-03-30 10:33:41 +0200 <abastro> I wonder what does `toString` do
2022-03-30 10:34:02 +0200 <dminuoso> Which toString?
2022-03-30 10:34:19 +0200`2jt(~jtomas@210.red-88-24-179.staticip.rima-tde.net)
2022-03-30 10:35:38 +0200 <Inst> @exa
2022-03-30 10:35:38 +0200 <lambdabot> Maybe you meant: vera eval
2022-03-30 10:35:42 +0200 <Inst> if you're still playing with me
2022-03-30 10:35:48 +0200 <Inst> i just realized what i wanted
2022-03-30 10:35:53 +0200 <Inst> which is basically record syntax for arguments
2022-03-30 10:35:56 +0200 <Inst> erm, functions
2022-03-30 10:36:22 +0200 <abastro> dminuoso: Data.ByteString.UTF8.toString I guess
2022-03-30 10:36:31 +0200 <Inst> by default, you run default arguments, but if you want to change any of the arguments, you invoke the function through a grabber, then the grabber changes the argument for you
2022-03-30 10:36:44 +0200 <abastro> dminuoso: The instance method of `IsString`
2022-03-30 10:36:47 +0200 <Inst> which is useful if someone added way too many arguments for the function to take
2022-03-30 10:38:47 +0200 <abastro> My unpopular opinion: Most libraries should take a record as single input instead of taking multiple inputs
2022-03-30 10:39:00 +0200 <dminuoso> Yes that is unpopular and a bad idea.
2022-03-30 10:39:26 +0200 <dminuoso> Otoh, there is some merit to that idea but not to avoid 1+ arguments
2022-03-30 10:40:13 +0200 <dminuoso> If you have a function `f :: ServerOpts -> T`, and not expose ServerOpts, but only a `defaultServerOpts` and field accessors, you can add fields without a) causing breakage and b) staying inside PVP minor versions
2022-03-30 10:42:59 +0200 <Hemmo> Hey! I have a unfinished function I am trying to get to work, but it gives a strange type error! I have a [string] as a parameter and when I try to load the file ghci complains about a type error?? It's a list of strings and not a string, but it still gives a Char error??
2022-03-30 10:43:00 +0200 <Hemmo> https://paste.tomsmeding.com/2cbEeWdb
2022-03-30 10:43:04 +0200 <Hemmo> Heres the code
2022-03-30 10:43:39 +0200tafa(~tafa@user/tafa) (Quit: ZNC - https://znc.in)
2022-03-30 10:44:25 +0200jespada(~jespada@cpc121022-nmal24-2-0-cust171.19-2.cable.virginm.net) (Quit: Textual IRC Client: www.textualapp.com)
2022-03-30 10:44:39 +0200abastro(~abab9579@143.248.229.191) (Ping timeout: 260 seconds)
2022-03-30 10:45:01 +0200 <abastro[m]> dminuoso, why is it a bad idea?
2022-03-30 10:45:05 +0200tafa(~tafa@user/tafa)
2022-03-30 10:47:06 +0200 <Guest|18> tifa
2022-03-30 10:47:09 +0200 <dminuoso> abastro[m]: Well I guess it depends. Is if useful to carry it curried around?
2022-03-30 10:47:24 +0200 <dminuoso> But insisting it takes only 1 argument for the sake of taking 1 argument, thats just a poor design choice
2022-03-30 10:49:32 +0200abastro(~abab9579@143.248.229.191)
2022-03-30 10:50:22 +0200 <abastro> Oh, ofc for sake of having single argument, it is a bad idea.
2022-03-30 10:51:07 +0200 <abastro> However I also see many cases where benefit of currying doesn't apply
2022-03-30 10:51:07 +0200 <Guest|18> the function (String -> String -> Float) :-(
2022-03-30 10:51:41 +0200 <abastro> Especially when the two parameters have no specific reasonable order.
2022-03-30 10:52:02 +0200 <abastro> Having record as parameter also helps with readability of the function, since you can name the parameters
2022-03-30 10:54:20 +0200jespada(~jespada@cpc121022-nmal24-2-0-cust171.19-2.cable.virginm.net)
2022-03-30 10:55:40 +0200abastro(~abab9579@143.248.229.191) (Remote host closed the connection)
2022-03-30 10:56:28 +0200abastro(~abab9579@143.248.229.191)
2022-03-30 10:56:59 +0200lispy(~lispy@82.212.115.165) (Quit: Client closed)
2022-03-30 10:59:46 +0200Hemmo(Hemmo@eduroam-252-47.uta.fi) (Ping timeout: 246 seconds)
2022-03-30 11:00:25 +0200Hemmo(~Hemmo@91.221.67.198)
2022-03-30 11:16:57 +0200eL_Bart0(eL_Bart0@dietunichtguten.org) (Ping timeout: 240 seconds)
2022-03-30 11:18:49 +0200 <Hemmo> Okay so I get the right elements on my list of lists now, but is there a way to make it work so my function would make a list for each element of X? So the X would iterate over the Y's and when it hops on to the second X it will have created a list of the first one? Function here: clusters :: (String -> String -> Float) -> Float -> [String] -> [[String]]
2022-03-30 11:18:49 +0200 <Hemmo> clusters f d ss = [x | x <- ss, y <- ss, (f x y <= d)] : []
2022-03-30 11:19:38 +0200tzh(~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
2022-03-30 11:19:38 +0200 <Hemmo> So now it returns one list inside a list whereas I would like it to return multiple lists inside a list
2022-03-30 11:20:08 +0200 <Hemmo> Also as a sidenote; is it somehow possible to create this recursively since I must iterate over the same elements each time until I reach the last one?
2022-03-30 11:20:58 +0200dschrempf(~dominik@070-207.dynamic.dsl.fonira.net)
2022-03-30 11:21:08 +0200 <abastro[m]> So what you want is, like, for each y, make a list Ly that: Ly includes x when `f x y <= d`
2022-03-30 11:22:21 +0200abastro(~abab9579@143.248.229.191) (Ping timeout: 256 seconds)
2022-03-30 11:22:27 +0200 <abastro[m]> Right?
2022-03-30 11:22:42 +0200 <Hemmo> Uh for each X I would say
2022-03-30 11:22:49 +0200 <Hemmo> "For each string s in ss, the function clusters computes a "cluster", ie a list of similar strings in ss (strings that are at most distance d from the s). The list of strings similar to s should also contain s (if the distance function allows). "
2022-03-30 11:23:08 +0200 <Guest|18> [(f x y)| x <- ss, y <- ss, (f x y <= d)] ?
2022-03-30 11:23:52 +0200econo(uid147250@user/econo) (Quit: Connection closed for inactivity)
2022-03-30 11:25:00 +0200 <Hemmo> Also I wish to point out that I am not looking for straight up answers, but pointers on how to proceed ;D
2022-03-30 11:25:08 +0200kuribas(~user@ip-188-118-57-242.reverse.destiny.be)
2022-03-30 11:26:11 +0200agumonkey(~user@88.163.231.79)
2022-03-30 11:26:20 +0200 <kuribas> How do you compose a natural transformation?
2022-03-30 11:26:34 +0200 <kuribas> type (~>) f g = forall a. f a -> g a
2022-03-30 11:26:59 +0200 <kuribas> but then "type F3 f g h = f ~> (g ~> h)" gives a kind error.
2022-03-30 11:28:19 +0200 <[exa]> kuribas: I guess it doesn't like the hidden forall in (g~>h) ?
2022-03-30 11:28:38 +0200 <kuribas> yeah
2022-03-30 11:28:50 +0200 <abastro[m]> Hemmo: so, is your X the `s` in the problem statement?
2022-03-30 11:29:28 +0200eL_Bart0(eL_Bart0@dietunichtguten.org)
2022-03-30 11:30:07 +0200 <kuribas> [exa]: but it seems, if ~> works for any "a", then I should be able to partially apply the "a"?
2022-03-30 11:30:19 +0200DNH(~DNH@2a02:8108:1100:16d8:213d:84ff:7913:27a6)
2022-03-30 11:30:24 +0200 <Hemmo> Yes my X is the 's'
2022-03-30 11:30:53 +0200 <[exa]> Hemmo: btw re loading from files, the easiest way is to do something like: myStrings <- lines <$> readFile "myFile.txt"
2022-03-30 11:31:04 +0200 <abastro[m]> Hemmo: Then, you want to give list of y's, right? Because `y` is supposed to be the close one
2022-03-30 11:32:06 +0200 <[exa]> kuribas: you can tru writing the F3 with the explicit forall, but not sure it will work
2022-03-30 11:32:10 +0200 <[exa]> *try
2022-03-30 11:33:09 +0200 <Hemmo> abastro[m]: here's an example of what I am trying to accomplish: ss = ["aaabc", "aabdd", "a", "aa", "abdd", "bcbcb", "", "abcdefghij"] should return [[""],["a","aa"],["a","aa","aaabc"],["aa","aaabc","aabdd","bcbcb"],["aaabc","aabdd","abdd"],["aaabc","bcbcb"],["aabdd","abdd"],["abcdefghij"]]
2022-03-30 11:34:06 +0200 <abastro[m]> Well, Hemmo, we don't know which `f` function is applied there to get the result
2022-03-30 11:34:24 +0200 <Hemmo> Oh oh, let me share the full code to pastebin!
2022-03-30 11:34:39 +0200 <abastro[m]> But yea it seems like you need to list `y` instead of `x`
2022-03-30 11:35:04 +0200 <Hemmo> Oh yes
2022-03-30 11:35:08 +0200 <Hemmo> Now I got what you meant ;D
2022-03-30 11:35:12 +0200 <abastro[m]> <Hemmo> "clusters f d ss = [x | x <- ss..." <- In this code, you are listing x. Perhaps you'd want to list y, and somehow nest the list one level down
2022-03-30 11:35:14 +0200 <Hemmo> That's right, put the Y in the list
2022-03-30 11:35:52 +0200 <Hemmo> here's the full code too if you want to take a look; https://paste.tomsmeding.com/sooJbKaN
2022-03-30 11:36:10 +0200 <abastro[m]> Btw nesting the list is.. like
2022-03-30 11:36:10 +0200 <abastro[m]> `[[y | y <- ss, (put sth here)] | x <- ss]`
2022-03-30 11:36:44 +0200 <abastro[m]> Lisy comprehension's iteration comes at right side
2022-03-30 11:36:57 +0200 <abastro[m]> (Or, perhaps you could learn do notation here)
2022-03-30 11:37:18 +0200vicfred(~vicfred@user/vicfred) (Quit: Leaving)
2022-03-30 11:37:38 +0200kaph_(~kaph@net-93-67-57-97.cust.vodafonedsl.it) (Read error: Connection reset by peer)
2022-03-30 11:38:54 +0200CiaoSen(~Jura@p200300c95735b0002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
2022-03-30 11:39:59 +0200 <kuribas> [exa]: I suppose I'd need a type application and a type lambda.
2022-03-30 11:40:00 +0200 <Hemmo> Yeah I tried to do it the other way before; [x | [ x <- ss, y <- ss]] but that just gave errors ;D
2022-03-30 11:40:06 +0200 <kuribas> [exa]: the latter doesn't exist.
2022-03-30 11:40:18 +0200 <Hemmo> abastro[m]: got it to work now! thanks!
2022-03-30 11:40:37 +0200 <[exa]> kuribas: `forall` is the latter afaik
2022-03-30 11:40:49 +0200 <[exa]> except obvious limits
2022-03-30 11:40:55 +0200 <kuribas> hmm, you could put it in a newtype.
2022-03-30 11:41:29 +0200 <abastro[m]> Hemmo: congrats!
2022-03-30 11:41:44 +0200 <Hemmo> abastro[m]: cheers ;D
2022-03-30 11:41:48 +0200 <abastro[m]> kuribas: yea, if some typelevel stuff does not work, just make newtype.
2022-03-30 11:42:28 +0200xff0x(~xff0x@125x102x200x106.ap125.ftth.ucom.ne.jp) (Ping timeout: 246 seconds)
2022-03-30 11:42:57 +0200nice29(~nice29@183.37.157.66)
2022-03-30 11:44:56 +0200 <kuribas> newtype TypeLambda f a = TypeLambda (f @a)
2022-03-30 11:45:11 +0200 <kuribas> That doesn't look legal...
2022-03-30 11:45:40 +0200 <kuribas> abastro[m]: s/make newtype/use idris
2022-03-30 11:45:49 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Remote host closed the connection)
2022-03-30 11:46:11 +0200 <abastro[m]> Oh. I don't mean that one
2022-03-30 11:46:41 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net)
2022-03-30 11:46:44 +0200 <abastro[m]> `newtype (~>) f g a = MkA (f a -> g a)`
2022-03-30 11:46:47 +0200fendor(~fendor@178.165.199.73.wireless.dyn.drei.com) (Remote host closed the connection)
2022-03-30 11:49:00 +0200nice29(~nice29@183.37.157.66) (Quit: Connection closed)
2022-03-30 11:49:21 +0200kaph(~kaph@net-93-67-57-97.cust.vodafonedsl.it)
2022-03-30 11:51:23 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Ping timeout: 260 seconds)
2022-03-30 11:51:30 +0200deadmarshal_(~deadmarsh@95.38.118.21)
2022-03-30 12:00:01 +0200DNH(~DNH@2a02:8108:1100:16d8:213d:84ff:7913:27a6) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2022-03-30 12:01:53 +0200abastro(~abab9579@143.248.229.191)
2022-03-30 12:02:48 +0200nice29(~nice29@183.37.157.66)
2022-03-30 12:02:51 +0200DNH(~DNH@2a02:8108:1100:16d8:213d:84ff:7913:27a6)
2022-03-30 12:03:45 +0200nice29(~nice29@183.37.157.66) (Client Quit)
2022-03-30 12:04:12 +0200benin(~benin@183.82.176.175)
2022-03-30 12:07:03 +0200Hemmo(~Hemmo@91.221.67.198) (Remote host closed the connection)
2022-03-30 12:07:20 +0200Benzi-Junior(~BenziJuni@88-149-64-179.du.xdsl.is)
2022-03-30 12:10:20 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net)
2022-03-30 12:10:28 +0200abastro(~abab9579@143.248.229.191) (Remote host closed the connection)
2022-03-30 12:10:45 +0200nice29(~nice29@183.37.157.66)
2022-03-30 12:10:56 +0200abastro(~abab9579@143.248.229.191)
2022-03-30 12:15:21 +0200nice29(~nice29@183.37.157.66) (Ping timeout: 245 seconds)
2022-03-30 12:16:34 +0200xff0x(~xff0x@i121-117-52-147.s41.a013.ap.plala.or.jp)
2022-03-30 12:18:09 +0200komikat(~komikat@157.47.55.13)
2022-03-30 12:20:53 +0200komikat(~komikat@157.47.55.13) (Read error: Connection reset by peer)
2022-03-30 12:23:33 +0200dschrempf(~dominik@070-207.dynamic.dsl.fonira.net) (Ping timeout: 260 seconds)
2022-03-30 12:26:16 +0200ccntrq(~Thunderbi@2a01:c23:8d1c:5b00:7bca:2599:a3ae:73a4)
2022-03-30 12:26:40 +0200oskar_greda(~oskar_gre@84.69.89.37)
2022-03-30 12:30:39 +0200lavaman(~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Remote host closed the connection)
2022-03-30 12:30:49 +0200oskar_greda(~oskar_gre@84.69.89.37) (Client Quit)
2022-03-30 12:32:32 +0200benin(~benin@183.82.176.175) (Quit: The Lounge - https://thelounge.chat)
2022-03-30 12:35:16 +0200oskar_greda(~oskar_gre@84.69.89.37)
2022-03-30 12:37:24 +0200 <oskar_greda> Hey All, I work for MLabs - A remote Haskell consultancy, and we are growing rapidly in the Fintech/Blockchain space - I am looking for places to find solid Haskell devs, is anyone interested in having a chat about this?
2022-03-30 12:38:41 +0200DNH(~DNH@2a02:8108:1100:16d8:213d:84ff:7913:27a6) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2022-03-30 12:41:42 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2022-03-30 12:42:45 +0200DNH(~DNH@2a02:8108:1100:16d8:213d:84ff:7913:27a6)
2022-03-30 12:43:36 +0200Graham31415(~Graham@user/Graham31415) (Read error: Connection reset by peer)
2022-03-30 12:44:33 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds)
2022-03-30 12:45:14 +0200Graham31415(~Graham@user/Graham31415)
2022-03-30 12:45:25 +0200 <Andrew> abastro[m]: yeah, Data.ByteString.UTF8.toString sounds correct
2022-03-30 12:45:29 +0200 <Andrew> I used fromByteString, not ideal
2022-03-30 12:47:07 +0200jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-03-30 12:52:26 +0200CiaoSen(~Jura@p200300c95735b0002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
2022-03-30 12:52:41 +0200jakalx(~jakalx@base.jakalx.net)
2022-03-30 13:11:37 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2022-03-30 13:15:27 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds)
2022-03-30 13:19:22 +0200cfricke(~cfricke@user/cfricke) (Quit: WeeChat 3.4.1)
2022-03-30 13:21:42 +0200agumonkey(~user@88.163.231.79) (Remote host closed the connection)
2022-03-30 13:23:45 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2022-03-30 13:24:17 +0200dumptruckman(~dumptruck@45-79-173-88.ip.linodeusercontent.com) (Ping timeout: 240 seconds)
2022-03-30 13:26:16 +0200dumptruckman(~dumptruck@45-79-173-88.ip.linodeusercontent.com)
2022-03-30 13:27:02 +0200 <juri_> ugh. just had to debug a call to error, caused by a minor change in a different call to error. frustrating.
2022-03-30 13:27:31 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-03-30 13:32:11 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds)
2022-03-30 13:34:20 +0200dut(~dut@user/dut)
2022-03-30 13:35:10 +0200lavaman(~lavaman@c-174-63-118-52.hsd1.ma.comcast.net)
2022-03-30 13:40:46 +0200abastro(~abab9579@143.248.229.191) (Ping timeout: 245 seconds)
2022-03-30 13:41:11 +0200acidjnk(~acidjnk@p200300d0c7049f58501b6673664ff2c4.dip0.t-ipconnect.de) (Ping timeout: 245 seconds)
2022-03-30 13:45:59 +0200xkuru(~xkuru@user/xkuru)
2022-03-30 13:47:10 +0200abastro(~abab9579@192.249.26.126)
2022-03-30 14:00:30 +0200Deide(~deide@user/deide)
2022-03-30 14:01:02 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Remote host closed the connection)
2022-03-30 14:01:32 +0200MajorBiscuit(~MajorBisc@c-001-013-026.client.tudelft.eduvpn.nl) (Quit: WeeChat 3.4)
2022-03-30 14:01:41 +0200MajorBiscuit(~MajorBisc@c-001-013-026.client.tudelft.eduvpn.nl)
2022-03-30 14:01:57 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net)
2022-03-30 14:04:48 +0200Guest7414(~diego@151.67.153.91)
2022-03-30 14:07:07 +0200Inst(~Liam@2601:6c4:4080:3f80:e47a:f359:ed75:db12) (Ping timeout: 250 seconds)
2022-03-30 14:08:21 +0200Inst(~Liam@c-98-208-218-119.hsd1.fl.comcast.net)
2022-03-30 14:14:06 +0200jgeerds(~jgeerds@d5364b87.access.ecotel.net)
2022-03-30 14:14:37 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
2022-03-30 14:16:06 +0200cdman(~dcm@user/dmc/x-4369397) (Remote host closed the connection)
2022-03-30 14:16:23 +0200cdman(~dcm@27.2.218.248)
2022-03-30 14:16:23 +0200cdman(~dcm@27.2.218.248) (Changing host)
2022-03-30 14:16:23 +0200cdman(~dcm@user/dmc/x-4369397)
2022-03-30 14:20:18 +0200abastro(~abab9579@192.249.26.126) (Remote host closed the connection)
2022-03-30 14:20:31 +0200abastro(~abab9579@192.249.26.126)
2022-03-30 14:25:01 +0200pavonia(~user@user/siracusa) (Quit: Bye!)
2022-03-30 14:26:04 +0200boxscape_(~boxscape_@p4ff0be5f.dip0.t-ipconnect.de)
2022-03-30 14:28:37 +0200Unicorn_Princess(~Unicorn_P@93-103-228-248.dynamic.t-2.net)
2022-03-30 14:32:07 +0200cfricke(~cfricke@user/cfricke)
2022-03-30 14:32:34 +0200chenqisu1(~chenqisu1@183.217.200.168) (Quit: Leaving)
2022-03-30 14:33:17 +0200oskar_greda(~oskar_gre@84.69.89.37) (Quit: Client closed)
2022-03-30 14:33:30 +0200raehik1(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2022-03-30 14:34:50 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 272 seconds)
2022-03-30 14:35:21 +0200AlexNoo_AlexNoo
2022-03-30 14:36:46 +0200 <abastro[m]> Lmao someone near me just said that Go is going to be big
2022-03-30 14:37:05 +0200 <abastro[m]> E.g. compared to rust, rust is not great at maintenance. Like what
2022-03-30 14:39:01 +0200 <abastro[m]> I dislike how many ppl are eager to follow the megacorps, esp google
2022-03-30 14:39:19 +0200 <abastro[m]> Wait, sorry, I thought this was # haskell-offtopic
2022-03-30 14:45:10 +0200razetime(~quassel@117.254.35.251) (Ping timeout: 246 seconds)
2022-03-30 14:48:02 +0200 <kuribas> abastro[m]: worse is the eagerness to work in financial speculation and ecologically unfriendly pyramid schemes.
2022-03-30 14:49:30 +0200 <maerwald[m]> *sigh*
2022-03-30 14:50:53 +0200jgeerds(~jgeerds@d5364b87.access.ecotel.net) (Ping timeout: 250 seconds)
2022-03-30 14:51:24 +0200 <maerwald[m]> abastro: Go is already *much* bigger than haskell.
2022-03-30 14:51:26 +0200 <juri_> ok haskel. what the heck.
2022-03-30 14:52:45 +0200 <juri_> https://paste.rs/MzV.patch
2022-03-30 14:53:10 +0200 <juri_> that change is enough to cause the error in noIntersection to be called.
2022-03-30 14:53:37 +0200 <juri_> If i didn't know better (this is haskell, right?) i'd swear this is a compiler error.
2022-03-30 14:55:07 +0200 <kuribas> maerwald[m]: yeah, so what?
2022-03-30 14:58:48 +0200 <kuribas> As long is it gets decent tooling, good enough libraries, I don't care how popular haskell is.
2022-03-30 15:00:11 +0200razetime(~quassel@117.254.35.196)
2022-03-30 15:00:42 +0200dschrempf(~dominik@070-207.dynamic.dsl.fonira.net)
2022-03-30 15:02:41 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Remote host closed the connection)
2022-03-30 15:02:54 +0200 <maerwald> kuribas: I didn't draw a conclusion
2022-03-30 15:03:16 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net)
2022-03-30 15:03:24 +0200 <maerwald> except that popularity has little to do with language features
2022-03-30 15:03:27 +0200 <exarkun> There seems to be a sweet spot where it's just popular enough so that other smart people build those tools and libraries for you but not so popular that a lot of bad ideas get jammed in and ruin it, too.
2022-03-30 15:03:45 +0200 <maerwald> but I think Haskell community often thinks it's a race of features
2022-03-30 15:04:00 +0200 <abastro> I don't mean that it is race of features or anything
2022-03-30 15:04:11 +0200 <abastro> Just that it feels bad how Go is going dominant
2022-03-30 15:04:30 +0200 <maerwald> why?
2022-03-30 15:04:44 +0200 <abastro> Oh I think I am going to talk abt it in #haskell-offtopic
2022-03-30 15:04:46 +0200 <maerwald> I don't think they're attracting any Haskellers away
2022-03-30 15:04:52 +0200 <maerwald> rust is
2022-03-30 15:06:53 +0200lortabac(~lortabac@88.125.6.227) (Ping timeout: 260 seconds)
2022-03-30 15:07:09 +0200lortabac(~lortabac@2a01:e0a:541:b8f0:8d5e:9f6:968:fb4b)
2022-03-30 15:08:10 +0200 <abastro> Hmm
2022-03-30 15:08:16 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Ping timeout: 246 seconds)
2022-03-30 15:09:10 +0200 <abastro> I mean, Go vs Rust could change the entire programming ecosystem's direction
2022-03-30 15:09:21 +0200 <maerwald> Go and rust are not really competing imo
2022-03-30 15:09:57 +0200 <abastro> What I just heard kind of indicates that, tho I admit it could be exceptional
2022-03-30 15:10:04 +0200 <abastro> A company switching to Go from Rust
2022-03-30 15:10:19 +0200DNH(~DNH@2a02:8108:1100:16d8:213d:84ff:7913:27a6) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2022-03-30 15:10:20 +0200 <maerwald> yeah well, I also know a company that switched from Haskell to Go
2022-03-30 15:10:28 +0200 <c_wraith> if they can do that, they probably shouldn't used Rust in the first place.
2022-03-30 15:10:57 +0200 <maerwald> I just think those are probably rather business decisions, less so technical ones. These often come with the star team leaving the company
2022-03-30 15:10:59 +0200 <abastro> Oh, interesting
2022-03-30 15:11:16 +0200 <abastro> I see, so Rust is for places where it cannot afford Go?
2022-03-30 15:11:22 +0200 <abastro> Uh what is "cannot afford Go" hmm
2022-03-30 15:11:32 +0200 <c_wraith> Rust is for when circumstances preclude garbage collection. If you can switch to a language with garbage collection, you're paying a lot for something you don't need.
2022-03-30 15:11:37 +0200 <abastro> I mean, yea, it was because maintenance - Rust is harder to maintain, I guess
2022-03-30 15:11:53 +0200 <abastro> Hm doesn't go also have pointers?
2022-03-30 15:12:00 +0200 <maerwald> programmers think too much about technicalities. Those are only a small part of why a company might switch
2022-03-30 15:12:10 +0200 <abastro> Yep, I know
2022-03-30 15:12:37 +0200 <abastro> I mean, possibly Rust has less ppl working for it
2022-03-30 15:12:46 +0200 <abastro> Which is why they had to ditch rust
2022-03-30 15:13:22 +0200 <juri_> ease of hiring, willing to work for low pay, productive. pick two.
2022-03-30 15:13:47 +0200 <maerwald> one big part of Go's success is that the ecosystem has extremely good support for microservice architectures and a lot of clueless CTOs believe in that sort of thing
2022-03-30 15:15:21 +0200 <tdammers> juri_: or really just pick "productive"
2022-03-30 15:17:01 +0200 <abastro> Yeah, microservice architecture
2022-03-30 15:17:11 +0200DNH(~DNH@2a02:8108:1100:16d8:213d:84ff:7913:27a6)
2022-03-30 15:17:59 +0200 <abastro> Meh..
2022-03-30 15:18:13 +0200 <abastro> Why are CTOs not great at tech itself
2022-03-30 15:18:16 +0200 <juri_> we microservice (13 microish services), but it's hard. each service has a library of types that is sometimes required in other services.
2022-03-30 15:18:33 +0200Inst(~Liam@c-98-208-218-119.hsd1.fl.comcast.net) (Ping timeout: 260 seconds)
2022-03-30 15:18:36 +0200 <abastro> Well they perhaps just design each microservice as crap
2022-03-30 15:18:46 +0200 <abastro> And patch problems in hard-coding manner
2022-03-30 15:18:46 +0200 <juri_> stack didn't like that very much, so we moved back to cabal.
2022-03-30 15:19:50 +0200 <tdammers> the problem with microservices is that you need a lot of infrastructure in place before you can even begin to implement actual features without fighting the architecture every step
2022-03-30 15:20:20 +0200 <tdammers> you pay a huge up-front cost, and whether it'll actually pay off is questionable
2022-03-30 15:20:27 +0200belphegor666(~satan@user/belphegor666) (Ping timeout: 260 seconds)
2022-03-30 15:22:27 +0200belphegor666(~satan@ip-046-223-003-068.um13.pools.vodafone-ip.de)
2022-03-30 15:22:29 +0200ProfSimm(~ProfSimm@87.227.196.109) (Remote host closed the connection)
2022-03-30 15:22:58 +0200 <maerwald> tdammers: only if you have massive scaling issues
2022-03-30 15:23:01 +0200 <maerwald> and most companies don't
2022-03-30 15:23:10 +0200 <abastro> Scaling issues?
2022-03-30 15:23:26 +0200 <maerwald> yes, microservices allow micro-managing scaling
2022-03-30 15:23:44 +0200 <maerwald> if you have one monolith and a tiny part of it needs more ram, well
2022-03-30 15:24:14 +0200 <maerwald> it's more of an optimization strategy than an architecture pattern
2022-03-30 15:24:20 +0200 <tdammers> indeed
2022-03-30 15:24:28 +0200 <tdammers> also, not just performance, but also decoupling deployments
2022-03-30 15:24:34 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
2022-03-30 15:24:58 +0200 <tdammers> instead of taking the entire system down, installing new code, and then firing it up again, you upgrade each individual service whenever you have updates for it
2022-03-30 15:25:13 +0200 <maerwald> today people use it to facilitate team and sprint separation
2022-03-30 15:25:28 +0200 <tdammers> indeed, but that's kind of throwing the baby out with the bathwater
2022-03-30 15:25:45 +0200 <juri_> we have one big helm chart that covers all of the things, so you upgrade every time regardless.
2022-03-30 15:25:56 +0200 <tdammers> the proper answer to that problem is "librarize your components, and set up an internal supply chain"
2022-03-30 15:26:12 +0200 <maerwald> this one is great about microservices: https://www.youtube.com/watch?v=y8OnoxKotPQ xD
2022-03-30 15:26:29 +0200 <tdammers> you can have 30 teams working independently on 30 modules, and still ship the system as a monolith
2022-03-30 15:28:34 +0200 <maerwald> if you think that video is exaggarating... it is not. I've been in the middle of it xD
2022-03-30 15:28:45 +0200 <maerwald> took me 4 months to figure out it's not me who's insane
2022-03-30 15:29:20 +0200 <remexre> Is there a standard technique for deriving a structural editing structure (with multiple holes, etc) from a zipper? It "feels like" it should be easy, but I'm missing something in the translation from single-hole zippers to multi-hole
2022-03-30 15:30:05 +0200dextaa_(~dextaa@user/dextaa) (Remote host closed the connection)
2022-03-30 15:30:09 +0200gaff(~gaff@49.207.210.61)
2022-03-30 15:30:18 +0200gaff(~gaff@49.207.210.61) (Client Quit)
2022-03-30 15:30:45 +0200 <lortabac> maerwald: that video describes my old job accurately :D
2022-03-30 15:31:00 +0200 <maerwald> oh, a fellow microservice veteran
2022-03-30 15:31:20 +0200dextaa_(~dextaa@user/dextaa)
2022-03-30 15:31:21 +0200 <geekosaur> I feel like zipper doesn't work for dynamic editing structures? it's more for static ones. don't you want a rope instead?
2022-03-30 15:32:23 +0200 <maerwald> lortabac: at some point, they used microservice architecture to improve database queries... so one microservice would push data to another, that one would denormalize it for faster queries, etc.
2022-03-30 15:32:37 +0200 <maerwald> I mean...
2022-03-30 15:32:48 +0200 <remexre> geekosaur: what do you mean by static vs dynamic? I'm not quite actually making a text editor (i.e. this is an API, not a UI), so I probably don't actually want a rope I think?
2022-03-30 15:33:26 +0200 <lortabac> maerwald: haha reality is even worse than the video
2022-03-30 15:33:26 +0200 <geekosaur> zippers are good when you have a fixed number of foci. ropes seem like they'd be better if it's dynamic
2022-03-30 15:33:35 +0200 <maerwald> and you needed to be *very* careful to not accidentially create cycles in the microservice dependency graphs
2022-03-30 15:33:55 +0200 <abastro> Eww incredibly small microservice
2022-03-30 15:34:03 +0200 <abastro> Like how does the company manage to handle all that
2022-03-30 15:34:07 +0200 <geekosaur> *flashbacks to OLE*
2022-03-30 15:34:08 +0200 <abastro> By sheer manpower?
2022-03-30 15:34:11 +0200 <maerwald> yes
2022-03-30 15:34:15 +0200 <juri_> geekosaur: *triggered*
2022-03-30 15:34:28 +0200 <abastro> Oh god no
2022-03-30 15:34:33 +0200 <lortabac> yes, microservices needs a crazy amount of manpower
2022-03-30 15:34:43 +0200 <maerwald> and very smart engineers
2022-03-30 15:34:50 +0200 <maerwald> I'm not being sarcastic
2022-03-30 15:34:51 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net)
2022-03-30 15:34:52 +0200 <abastro> And that is why they need to hire ppl at bargain price
2022-03-30 15:35:00 +0200 <maerwald> that stuff is really complicated
2022-03-30 15:35:39 +0200 <lortabac> to be honest there are some cases in which a network barrier between components is actually useful
2022-03-30 15:35:42 +0200 <remexre> geekosaur: what would a rope on a tree structure actually look like?
2022-03-30 15:36:02 +0200 <abastro> So.. handful of smart ppl, lots of coders just bashing at keyboard to make something vaguely close to "working"
2022-03-30 15:36:16 +0200 <geekosaur> mm, that's a good question
2022-03-30 15:36:32 +0200 <lortabac> however IMHO it should be a technical choice and not an imposed organizational thing
2022-03-30 15:36:33 +0200 <maerwald> abastro: I mean, that stuff was born from big companies. And then small companies thought they have the same problem like the big ones
2022-03-30 15:37:01 +0200 <maerwald> and programmers rarely question business value of tech decisions
2022-03-30 15:37:03 +0200 <abastro[m]> Oh noo
2022-03-30 15:37:07 +0200 <maerwald> so they just go one with what they know
2022-03-30 15:37:22 +0200 <geekosaur> guess you're looking at a tree where you can treat any part as an independent "root"?
2022-03-30 15:37:26 +0200 <abastro[m]> I hate when ppl just copy the megacorps
2022-03-30 15:37:33 +0200 <abastro[m]> "Because they succeeded" ..
2022-03-30 15:37:37 +0200 <geekosaur> but I'd need to know more about the API in question
2022-03-30 15:37:59 +0200 <maerwald> abastro[m]: that's what most CTOs do... read blog posts from google employees
2022-03-30 15:37:59 +0200 <geekosaur> treesshould actually be pretty good at that, though
2022-03-30 15:38:16 +0200 <abastro[m]> Wh
2022-03-30 15:38:26 +0200 <abastro[m]> "CTO" Yet just read employees
2022-03-30 15:38:32 +0200 <geekosaur> since the only realdifference between the actual root and your current "focus" is that one has a parent node
2022-03-30 15:38:56 +0200 <abastro[m]> I get that megacorps like microservices, their "micro" is still big
2022-03-30 15:39:03 +0200 <abastro[m]> But small companies..
2022-03-30 15:39:04 +0200 <abastro[m]> Meh
2022-03-30 15:39:19 +0200Pickchea(~private@user/pickchea)
2022-03-30 15:39:48 +0200 <maerwald> anyway, we're disrupting someone asking actuall Haskell questions :p
2022-03-30 15:40:01 +0200 <geekosaur> the hard part in Haskell is you can't easily build nodes with actual parent pointers (you can tie the knot, but then you can't update easily) so moving through the tree is difficult without holding on to what amounts to the whole spine
2022-03-30 15:40:09 +0200 <abastro[m]> Ouch
2022-03-30 15:40:25 +0200 <remexre> geekosaur: yeah, that's why I was thinking of zippers
2022-03-30 15:40:43 +0200abastro(~abab9579@192.249.26.126) (Ping timeout: 260 seconds)
2022-03-30 15:41:21 +0200 <remexre> I'm basically trying to build a tactic engine for a simple PL
2022-03-30 15:41:39 +0200 <geekosaur> zipper on a tree just automates that part. but yes, multiple zippers then becomes a problem. I know tree zippers exist but don'tknow about multiple foci in that case
2022-03-30 15:41:54 +0200 <abastro[m]> (Posted continuing convo in #haskell-offtopic)
2022-03-30 15:41:58 +0200 <geekosaur> hypothetically it's just another differentiation
2022-03-30 15:42:26 +0200 <geekosaur> but practically what does that mean? :)
2022-03-30 15:42:33 +0200 <remexre> so I guess the API I want is something like, "navigate cursors around, replace the current subtree, rebuild the whole tree into a 'real tree' so semantic checks can happen"
2022-03-30 15:43:25 +0200jlamothe(~jlamothe@198.251.61.229) (Quit: leaving)
2022-03-30 15:44:35 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-03-30 15:44:35 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-03-30 15:44:35 +0200wroathe(~wroathe@user/wroathe)
2022-03-30 15:45:04 +0200zer0bitz(~zer0bitz@2001:2003:f750:a200:88a0:fb04:2d2:c434)
2022-03-30 15:45:08 +0200shriekingnoise(~shrieking@201.231.16.156)
2022-03-30 15:45:26 +0200 <remexre> augh, sry, afk
2022-03-30 15:46:31 +0200 <geekosaur> how many cursors will need to be around at any given time? and what happens if they overlap?
2022-03-30 15:47:00 +0200szkl(uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
2022-03-30 15:47:08 +0200 <abastro[m]> Sounds like ConcurrentModificationException
2022-03-30 15:47:47 +0200acidjnk(~acidjnk@p200300d0c7049f58687650f0568aa4d7.dip0.t-ipconnect.de)
2022-03-30 15:48:23 +0200 <geekosaur> yeh, that'sthe next question, how many of these cursors are held by the same session
2022-03-30 15:49:42 +0200 <geekosaur> and is there a concept of splitting / joining cursors
2022-03-30 15:53:00 +0200abastro(~abab9579@192.249.26.126)
2022-03-30 15:54:35 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 250 seconds)
2022-03-30 15:54:53 +0200jlamothe(~jlamothe@198.251.61.229)
2022-03-30 15:56:26 +0200dschrempf(~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.4.1)
2022-03-30 15:57:54 +0200 <remexre> ok back, sorry about that
2022-03-30 15:58:09 +0200 <remexre> hm, yeah, hadn't thought about the overlapping case
2022-03-30 15:58:44 +0200 <remexre> maybe I could tweak it to having one cursor, but multiple holes, as long as I can efficiently find the holes?
2022-03-30 16:00:21 +0200 <geekosaur> well, that still depends on how you represent the zipper, which depends on how many holes
2022-03-30 16:01:49 +0200 <geekosaur> and may depend on how the tree itself is represented (i.e. can we get away with having null trees, or do we need to use Maybe?)
2022-03-30 16:02:36 +0200 <remexre> null trees? I've got it represented as a pattern functor, so it shouldn't be hard to do the MaybeFix f = Maybe (f (MaybeFix f)) thing
2022-03-30 16:02:45 +0200jonathanx_(~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection)
2022-03-30 16:04:58 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 246 seconds)
2022-03-30 16:06:22 +0200 <geekosaur> ok, I was thinking something that looked more like the traditional list zipper, only with a list of foci and intervening subtrees. but come to think of it, not sure that would work
2022-03-30 16:08:07 +0200Sgeo(~Sgeo@user/sgeo)
2022-03-30 16:12:39 +0200Inst(~Liam@2601:6c4:4080:3f80:6050:16ec:fe01:4f97)
2022-03-30 16:12:45 +0200 <Inst> i'm busy being pissed off at record syntax
2022-03-30 16:12:57 +0200 <Inst> you know my dream is to have the Chinese government adopt Haskell, and rebrand it to Micius, after the ancient Chinese logician and militant pacifist Mozi
2022-03-30 16:13:09 +0200 <Inst> fork it as well
2022-03-30 16:13:18 +0200 <Inst> one of the first things that happen is that the record syntax system has to be replaced
2022-03-30 16:14:48 +0200 <Inst> Mozi is a very good name for a FP language, i.e, Mozi ran around defending cities from attackers (i.e, high security), was a logician and physicist a couple of centuries before Christ
2022-03-30 16:14:56 +0200 <Inst> and we'll put the keywords in Wenyanwen ;)
2022-03-30 16:15:06 +0200 <Inst> (classical Chinese, which is extremely terse)
2022-03-30 16:15:42 +0200 <maerwald> SJTUG teaches Haskell, no?
2022-03-30 16:20:20 +0200 <geekosaur> record syntax got reworked in 9.2 didn't it? although you really want lens (which fits well with the newer stuff)
2022-03-30 16:24:08 +0200 <c_wraith> except 9.2 also got RecordDotSyntax, which is a travesty of overloading the . character even more
2022-03-30 16:25:27 +0200 <geekosaur> tempting to reference the Go discussion here }:>
2022-03-30 16:27:38 +0200ProfSimm(~ProfSimm@87.227.196.109)
2022-03-30 16:29:43 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-03-30 16:34:01 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 246 seconds)
2022-03-30 16:35:45 +0200odnes_(~odnes@5-203-245-187.pat.nym.cosmote.net)
2022-03-30 16:36:36 +0200jinsun__(~jinsun@user/jinsun)
2022-03-30 16:37:04 +0200odnes(~odnes@5-203-245-187.pat.nym.cosmote.net) (Read error: Connection reset by peer)
2022-03-30 16:37:20 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Remote host closed the connection)
2022-03-30 16:37:27 +0200jinsun(~jinsun@user/jinsun) (Ping timeout: 260 seconds)
2022-03-30 16:38:30 +0200 <Inst> maerwald: Shanghai Jiaotong?
2022-03-30 16:38:34 +0200 <Inst> That's my Dad's alma
2022-03-30 16:38:49 +0200jinsun__(~jinsun@user/jinsun) (Client Quit)
2022-03-30 16:39:09 +0200jinsun(~jinsun@user/jinsun)
2022-03-30 16:39:15 +0200 <maerwald> yes I think so
2022-03-30 16:40:11 +0200 <Inst> nice, and he won't overwatch me learning comp sci
2022-03-30 16:40:23 +0200ccntrq(~Thunderbi@2a01:c23:8d1c:5b00:7bca:2599:a3ae:73a4) (Quit: ccntrq)
2022-03-30 16:40:27 +0200ccntrq1(~Thunderbi@dynamic-077-001-011-041.77.1.pool.telefonica.de)
2022-03-30 16:40:33 +0200 <Inst> how badly overloaded is . right now?
2022-03-30 16:40:53 +0200 <Inst> iirc it's the function composition operator, for f.g, \x -> f (g x)
2022-03-30 16:41:51 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net)
2022-03-30 16:42:46 +0200ccntrq1ccntrq
2022-03-30 16:43:03 +0200 <geekosaur> function composition, module separator, module hierarchy separator, decimal point, series syntax (Foo(..), [f..g], etc.)
2022-03-30 16:43:17 +0200 <geekosaur> there's already a conflict between those
2022-03-30 16:43:35 +0200 <geekosaur> > [False..True] -- legal Haskell but misparsed by ghc
2022-03-30 16:43:37 +0200 <lambdabot> error:
2022-03-30 16:43:37 +0200 <lambdabot> Not in scope: ‘False..’
2022-03-30 16:43:37 +0200 <lambdabot> No module named ‘False’ is imported.error:
2022-03-30 16:44:55 +0200 <geekosaur> it's a tricky one to get right, lexing has to know that False is not a module name so it doesn't treat it as one
2022-03-30 16:45:20 +0200 <geekosaur> RecordDotSyntax introduces the same conflict but with lowercase names
2022-03-30 16:45:57 +0200abastro(~abab9579@192.249.26.126) (Ping timeout: 250 seconds)
2022-03-30 16:46:36 +0200acidjnk(~acidjnk@p200300d0c7049f58687650f0568aa4d7.dip0.t-ipconnect.de) (Ping timeout: 245 seconds)
2022-03-30 16:46:59 +0200anderson(~ande@user/anderson) (Quit: bye)
2022-03-30 16:46:59 +0200eldritch(~eldritch@user/eldritch) (Quit: bye)
2022-03-30 16:46:59 +0200glider(~glider@user/glider) (Quit: ZNC - https://znc.in)
2022-03-30 16:47:00 +0200lortabac(~lortabac@2a01:e0a:541:b8f0:8d5e:9f6:968:fb4b) (Quit: WeeChat 2.8)
2022-03-30 16:47:23 +0200 <geekosaur> which requires feedback between the typechecker and lexing, or (ghc's solution) just treating any `x.y` as record dot and requiring spaces around the `.` to get composition
2022-03-30 16:48:25 +0200 <abastro[m]> That is quite clever solution actually
2022-03-30 16:49:05 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-03-30 16:51:40 +0200 <tdammers> I've been thinking about alternative record systems a bit, and even tried the one Purescript uses in production, and came to the conclusion that the status quo isn't actually too bad
2022-03-30 16:51:47 +0200cfricke(~cfricke@user/cfricke) (Quit: WeeChat 3.4.1)
2022-03-30 16:52:38 +0200 <tdammers> I think the best we could do without breaking compatibility would be some kind of syntax sugar for record updates, but then again, lenses already achieve that without changing or extending the core language, so there's that
2022-03-30 16:53:01 +0200 <abastro[m]> Status quo?
2022-03-30 16:53:10 +0200 <tdammers> Record syntax as it is in Haskell now.
2022-03-30 16:53:12 +0200 <abastro[m]> Oh existing records
2022-03-30 16:53:16 +0200 <geekosaur> "what already is", in Latin
2022-03-30 16:53:31 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.5)
2022-03-30 16:53:41 +0200 <abastro[m]> What I am getting is that ppl dislike namespace pollution
2022-03-30 16:53:45 +0200 <tdammers> the beauty is that the "is" is implicit. Latin is great that way.
2022-03-30 16:53:54 +0200Guest7414(~diego@151.67.153.91) (Quit: Leaving)
2022-03-30 16:54:12 +0200 <tdammers> abastro[m]: yes, that is a bit of a downside. But the alternative isn't that much better.
2022-03-30 16:54:18 +0200Lord_of_Life_(~Lord@user/lord-of-life/x-2819915)
2022-03-30 16:54:30 +0200 <abastro[m]> Yea, possibly
2022-03-30 16:54:39 +0200 <tdammers> and if you can accept a "one exported record type per module" policy, then the problem largely goes away
2022-03-30 16:54:44 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 260 seconds)
2022-03-30 16:54:55 +0200 <tdammers> I do this a lot in projects that require lots of record types
2022-03-30 16:55:11 +0200 <abastro[m]> One exported record per module?
2022-03-30 16:55:14 +0200 <tdammers> yes
2022-03-30 16:55:23 +0200 <abastro[m]> Hm, how do you avoid cyclic reference in modules
2022-03-30 16:55:26 +0200anderson(~ande@user/anderson)
2022-03-30 16:55:50 +0200 <tdammers> the kind of record types for which you would do this would not normally need cyclic references
2022-03-30 16:56:07 +0200raehik1(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds)
2022-03-30 16:56:14 +0200 <abastro[m]> I mean, functions involved with records
2022-03-30 16:56:35 +0200 <tdammers> you define the functions elsewhere. the "record module" only defines the record type itself.
2022-03-30 16:56:38 +0200 <abastro[m]> (Why do I feel like this is flexible Java classes, one record per file..)
2022-03-30 16:56:45 +0200 <abastro[m]> Oh
2022-03-30 16:56:46 +0200__monty__(~toonn@user/toonn)
2022-03-30 16:56:47 +0200 <abastro[m]> Now I see.
2022-03-30 16:56:55 +0200 <abastro[m]> Makes quite a sense
2022-03-30 16:57:00 +0200jinsun__(~jinsun@user/jinsun)
2022-03-30 16:57:01 +0200Lord_of_Life_Lord_of_Life
2022-03-30 16:57:12 +0200 <abastro[m]> Maybe ppl just do not like that approach
2022-03-30 16:57:18 +0200 <tdammers> e.g.: module Entities.User where data User = { username :: Text, password :: Hash, email :: EMailAddress }
2022-03-30 16:57:27 +0200 <abastro[m]> Perhaps because too many imports
2022-03-30 16:57:45 +0200 <tdammers> it's a pity you can't re-export qualified
2022-03-30 16:57:46 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-03-30 16:57:58 +0200 <abastro[m]> Now that
2022-03-30 16:57:59 +0200eldritch(~eldritch@user/eldritch)
2022-03-30 16:58:09 +0200 <abastro[m]> That is the prime pain point I found
2022-03-30 16:58:25 +0200geekosaurshudders at the linker pain trying to support that would cause
2022-03-30 16:58:25 +0200 <tdammers> so if you want User and Page to be imported into different namespaces, you have to import them separately; you can't make a "God module" that imports all your different record types and re-exports each one into a separate namespace
2022-03-30 16:58:31 +0200 <abastro[m]> If that was solved, namespace pollution would not affect me anymore
2022-03-30 16:58:51 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
2022-03-30 16:59:00 +0200 <tdammers> geekosaur: well, the problem is of course that GHC Haskell conflates "source file", "compilation unit", and "namespace", and conveniently assumes that those are the same thing
2022-03-30 16:59:06 +0200glider(~glider@user/glider)
2022-03-30 16:59:12 +0200 <abastro[m]> Yea tbh I like any kind of namespace
2022-03-30 16:59:24 +0200 <tdammers> (also "module")
2022-03-30 16:59:50 +0200 <abastro[m]> Haskell, avoid success at all costs, yet does not fix its namespace/compile unit issues
2022-03-30 17:00:06 +0200 <tdammers> if we could define namespaces independently from compilation unit boundaries, like in C++, then that would solve the issue (but also introduce new ones, so there's that)
2022-03-30 17:01:08 +0200jinsun(~jinsun@user/jinsun) (Ping timeout: 272 seconds)
2022-03-30 17:02:26 +0200aplainzetakind(~johndoe@captainludd.powered.by.lunarbnc.net) (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net)
2022-03-30 17:03:24 +0200 <abastro[m]> Yep, honestly it would be great if haskell did not oversimplify this part
2022-03-30 17:03:35 +0200ccntrq(~Thunderbi@dynamic-077-001-011-041.77.1.pool.telefonica.de) (Quit: ccntrq)
2022-03-30 17:03:52 +0200ccntrq(~Thunderbi@dynamic-077-001-011-041.77.1.pool.telefonica.de)
2022-03-30 17:04:08 +0200 <tdammers> unfortunately, the module system as it is is difficult to extend / replace
2022-03-30 17:04:43 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds)
2022-03-30 17:06:13 +0200razetime(~quassel@117.254.35.196) (Ping timeout: 240 seconds)
2022-03-30 17:06:39 +0200 <geekosaur> mm, now that I think about it, I wonder if that's actually true. the real name of anything is qualified by full module and package names; namespaces could be implemented by replacing the module part, conceivably
2022-03-30 17:07:29 +0200 <geekosaur> exceptthat would make the reexport collide with the original definition, hm
2022-03-30 17:07:48 +0200 <geekosaur> (which is why this is a problem to begin with)
2022-03-30 17:12:09 +0200jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-03-30 17:14:45 +0200razetime(~quassel@117.254.35.251)
2022-03-30 17:15:54 +0200raehik1(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2022-03-30 17:16:10 +0200 <abastro[m]> Reexport collide?
2022-03-30 17:16:37 +0200jakalx(~jakalx@base.jakalx.net)
2022-03-30 17:17:13 +0200 <abastro[m]> Oh, so basically you can reexport named exports along with original name?
2022-03-30 17:17:24 +0200 <abastro[m]> Just that it would require both
2022-03-30 17:17:36 +0200 <geekosaur> no
2022-03-30 17:17:56 +0200 <geekosaur> I'm saying if a module tried to reexport qualified, the qualified name would conflict with the original at link time
2022-03-30 17:18:37 +0200 <geekosaur> therewould need to be a way to distinguish namespaced names from module names, and then you'd have to work specifically with one or the other even though they both refer to the same thing
2022-03-30 17:22:32 +0200ccntrq1(~Thunderbi@2a01:c23:8d1c:5b00:e103:4fc:b5d9:b33d)
2022-03-30 17:24:37 +0200ccntrq(~Thunderbi@dynamic-077-001-011-041.77.1.pool.telefonica.de) (Ping timeout: 240 seconds)
2022-03-30 17:24:37 +0200ccntrq1ccntrq
2022-03-30 17:26:04 +0200 <abastro[m]> Oh, qualified conflict with original?
2022-03-30 17:26:07 +0200 <abastro[m]> Wait how
2022-03-30 17:26:28 +0200 <geekosaur> sigh
2022-03-30 17:26:31 +0200 <geekosaur> read back
2022-03-30 17:26:46 +0200 <geekosaur> [30 15:06:39] <geekosaur> mm, now that I think about it, I wonder if that's actually true. the real name of anything is qualified by full module and package names; namespaces could be implemented by replacing the module part, conceivably
2022-03-30 17:27:19 +0200 <geekosaur> I am talking about how one might add namespaces without breaking literally every existing library
2022-03-30 17:27:36 +0200 <geekosaur> except that it introduces a different problem
2022-03-30 17:29:56 +0200 <abastro[m]> Oh, sorry. I am not informed enough to understand that in one go.
2022-03-30 17:31:45 +0200cdman(~dcm@user/dmc/x-4369397) (Quit: Leaving)
2022-03-30 17:31:49 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
2022-03-30 17:37:14 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 272 seconds)
2022-03-30 17:38:03 +0200 <Andrew> Simple way to decode UTF-8 encoded ByteString replacing invalid stuff with U+FFFD rather than a Nothing value or an Exception?
2022-03-30 17:38:27 +0200dextaa_(~dextaa@user/dextaa) (Remote host closed the connection)
2022-03-30 17:40:50 +0200 <maerwald> Andrew: is that a question?
2022-03-30 17:41:08 +0200 <Andrew> Yeah
2022-03-30 17:41:14 +0200 <maerwald> https://hackage.haskell.org/package/text-2.0/docs/Data-Text-Encoding.html#v:decodeUtf8With
2022-03-30 17:41:25 +0200 <Andrew> Thanks :P
2022-03-30 17:43:04 +0200razetime(~quassel@117.254.35.251) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2022-03-30 17:50:23 +0200dut_(~dut@user/dut)
2022-03-30 17:52:28 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-03-30 17:53:31 +0200dut(~dut@user/dut) (Ping timeout: 260 seconds)
2022-03-30 17:55:25 +0200 <Andrew> What the heck is the Text type
2022-03-30 17:55:30 +0200 <Andrew> I want [Char]
2022-03-30 17:58:13 +0200Pickchea(~private@user/pickchea) (Ping timeout: 256 seconds)
2022-03-30 17:59:33 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 260 seconds)
2022-03-30 17:59:41 +0200 <sm> https://hackage.haskell.org/package/text-2.0/docs/Data-Text.html#v:unpack
2022-03-30 18:00:41 +0200lbseale(~ep1ctetus@user/ep1ctetus) (Read error: Connection reset by peer)
2022-03-30 18:01:52 +0200 <maerwald> Andrew: Text is a more efficient type than String
2022-03-30 18:02:05 +0200lbseale(~ep1ctetus@user/ep1ctetus)
2022-03-30 18:02:06 +0200razetime(~quassel@117.254.35.251)
2022-03-30 18:02:35 +0200 <geekosaur> most people who think they want [Char] probably want something mroe efficient than a singly linked list
2022-03-30 18:02:58 +0200 <Andrew> Okay, I'll look into that
2022-03-30 18:03:33 +0200gurkenglas(~gurkengla@dslb-178-012-018-212.178.012.pools.vodafone-ip.de) (Ping timeout: 256 seconds)
2022-03-30 18:04:17 +0200 <Andrew> I wonder if that' a good idea while parsing internet protocols such as Irc
2022-03-30 18:04:56 +0200 <geekosaur> IRC would be mostly ByteString, tbh
2022-03-30 18:05:22 +0200 <geekosaur> and more complicated because there isn't actually an encoding for anything except nicks, which aren't utf8
2022-03-30 18:05:35 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Quit: ZNC - https://znc.in)
2022-03-30 18:05:38 +0200 <Andrew> hmm true
2022-03-30 18:05:47 +0200 <geekosaur> utf8 is a convention and not an especially widely used one; many clients attempt utf8 decode and fall back to latin-1
2022-03-30 18:05:51 +0200 <Andrew> so i should just deal with ByteString everywhere?
2022-03-30 18:06:26 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2022-03-30 18:06:32 +0200 <geekosaur> probably
2022-03-30 18:06:37 +0200 <Andrew> k
2022-03-30 18:06:49 +0200 <maerwald> Don't use the Char8 module
2022-03-30 18:06:53 +0200Andrewdislikes having so many text-like types and looks at https://hackage.haskell.org/package/monoid-subclasses-0.4.2/docs/Data-Monoid-Textual.html
2022-03-30 18:07:10 +0200gurkenglas(~gurkengla@dslb-178-012-018-212.178.012.pools.vodafone-ip.de)
2022-03-30 18:07:16 +0200 <Andrew> I just want a proper typeclass for everything that's text like
2022-03-30 18:07:48 +0200 <maerwald> we don't have, but there's IsString for converting from String to
2022-03-30 18:08:07 +0200 <maerwald> but it doesn't have any other useful typeclass functions
2022-03-30 18:08:20 +0200 <tdammers> There aren't that many text-like types, really
2022-03-30 18:08:35 +0200 <tdammers> ByteString, despite the name, is really just a byte array, not a text-like type
2022-03-30 18:08:45 +0200 <maerwald> tdammers: we have 3 bytestring like types
2022-03-30 18:08:48 +0200 <Andrew> Yes, I get that point
2022-03-30 18:09:08 +0200 <Andrew> Conversion is silly, we need proper typeclasses and polymorph
2022-03-30 18:09:09 +0200 <maerwald> it really is excessive
2022-03-30 18:09:40 +0200 <tdammers> and there's the lazy/strict distinction, but we really only have this because we can - other languages need more elaborate ceremony to give you lazy string / byte array processing
2022-03-30 18:09:45 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-03-30 18:10:00 +0200 <tdammers> I do agree that [Char] is silly
2022-03-30 18:10:00 +0200 <maerwald> streamly could solve that :p
2022-03-30 18:10:10 +0200 <maerwald> but it will never make it into base
2022-03-30 18:10:10 +0200dut_(~dut@user/dut) (Ping timeout: 272 seconds)
2022-03-30 18:10:16 +0200 <tdammers> but explicit conversions between ByteString and Text are 100% a good thing
2022-03-30 18:11:15 +0200 <Andrew> I agree with the last point
2022-03-30 18:12:03 +0200 <Andrew> We might as well go into ghc and make [Char] more efficent... [Char] as of now isn't practical but it looks really sweet and "correct"
2022-03-30 18:13:12 +0200 <geekosaur> hard to make a linked list more efficient without breaking it
2022-03-30 18:13:42 +0200 <tdammers> yeah. [Char] might seem theoretically elegant, but for practical string munging, it's horrible
2022-03-30 18:13:57 +0200 <tdammers> the theoretical elegance is why it's the default, after all
2022-03-30 18:14:12 +0200 <tdammers> but that was long before Haskell got anywhere near being a viable industry language
2022-03-30 18:14:13 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
2022-03-30 18:14:30 +0200 <maerwald> I think a linked list would be cool if the contents were graphemes
2022-03-30 18:15:07 +0200 <tdammers> you'd still have to deal with the massive memory overhead, cache trashing, and shlemiel-the-painter problems
2022-03-30 18:15:14 +0200 <geekosaur> wouldn't be enormously different from what we have now
2022-03-30 18:15:49 +0200ccntrq(~Thunderbi@2a01:c23:8d1c:5b00:e103:4fc:b5d9:b33d) (Remote host closed the connection)
2022-03-30 18:16:22 +0200 <Zemyla> Chars are 21 bits. You can fit three of them into a 64-bit word, along with an annotation bit that says whether there are 2 or 3 characters in that word. That makes them perfect for fingertrees.
2022-03-30 18:16:35 +0200Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
2022-03-30 18:17:06 +0200 <Zemyla> Fingertrees also give you O(log n) split and concatenate.
2022-03-30 18:17:06 +0200Vajb(~Vajb@2001:999:62:aa00:7f5a:4f10:c894:3813)
2022-03-30 18:17:55 +0200 <Andrew> to me, haskell means elegance
2022-03-30 18:18:19 +0200 <maerwald> Zemyla: excellent... so all we need now is a tech proposal. And if you push long enough (say, 10 years), you might actually get it into base :D
2022-03-30 18:19:48 +0200 <tdammers> Andrew: that's nice, but to other people, haskell means "a language that I can ship to production"
2022-03-30 18:22:11 +0200Andrewmissed the Lisp machines
2022-03-30 18:24:00 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Remote host closed the connection)
2022-03-30 18:26:22 +0200 <Andrew> Apparently they're before I was born, but lambda machines are just a great idea to me: why would we run beautiful functional code on (also beautiful, but inconsistent and incompatible) turing machines?
2022-03-30 18:26:25 +0200kuribas(~user@ip-188-118-57-242.reverse.destiny.be) (Quit: ERC (IRC client for Emacs 26.3))
2022-03-30 18:26:36 +0200 <Andrew> I mean hs and lisp would be much more efficent, supposedly
2022-03-30 18:26:50 +0200 <Andrew> At least it gives me a warm fuzzy feeling of "correctness"
2022-03-30 18:29:09 +0200 <monochrom> IMO the most important reason is: It doesn't really matter.
2022-03-30 18:29:15 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-03-30 18:29:58 +0200 <monochrom> Then, the secondary reason is historical trajectory and networking effect and economy of scale that landed at von-Neumann hardware.
2022-03-30 18:31:33 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net)
2022-03-30 18:31:43 +0200 <Andrew> "It doesn't really matter" ... I'm uncomfortable running functional code on imperatively-designed hardware
2022-03-30 18:31:47 +0200 <monochrom> If you're a C&C Red Alert fan, you might like to repeat its "go back in time, shake hand with Einstein, caused them to vanish, change history", except you s/Einstein/Turing/ so lambda calculus might have a better chance in the new time line.
2022-03-30 18:31:54 +0200 <Andrew> *designed-for-imperative
2022-03-30 18:32:41 +0200 <monochrom> Except that the same trope also says that whoever you think would have a better chance does not, there is always something else that comes up.
2022-03-30 18:33:04 +0200 <maerwald> correctness? pah
2022-03-30 18:33:10 +0200 <monochrom> Your comfort level doesn't matter, either. The computer doesn't care.
2022-03-30 18:36:44 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Ping timeout: 252 seconds)
2022-03-30 18:38:52 +0200dfg(dfg@user/dfg) (Quit: I hate quit messages.)
2022-03-30 18:39:56 +0200odnes_(~odnes@5-203-245-187.pat.nym.cosmote.net) (Ping timeout: 272 seconds)
2022-03-30 18:40:11 +0200dfg(~dfg@dfg.rocks)
2022-03-30 18:40:11 +0200dfg(~dfg@dfg.rocks) (Changing host)
2022-03-30 18:40:11 +0200dfg(~dfg@user/dfg)
2022-03-30 18:40:18 +0200DNH(~DNH@2a02:8108:1100:16d8:213d:84ff:7913:27a6) (Ping timeout: 260 seconds)
2022-03-30 18:43:13 +0200 <sm> everybody says [Char] is horribly inefficient without actually testing it, but it's not so clear cut. For the common case of small strings, IIRC it can be faster. It's also much easier to work with when getting started.
2022-03-30 18:43:53 +0200 <sm> s/when getting started//
2022-03-30 18:45:02 +0200 <dsal> Yeah, I use String a lot without it having any negative impact on my life.
2022-03-30 18:45:29 +0200 <raehik1> I'm trying to add a remote Cabal dependency to a non-Hackage pkg. Contains some C. When I add it as a dep to my separate project, Cabal fails and complains "include dir doesn't exist". But it builds fine by itself.
2022-03-30 18:46:38 +0200 <raehik1> I can fix it by adding the required header to install-includes. But I'm not sure why that fixes it & whether it's the right fix, since it's an internal-only header
2022-03-30 18:47:26 +0200 <raehik1> Same problem if you try "cabal install --lib". pkg I'm trying to use: https://github.com/keystone-engine/keystone/tree/master/bindings/haskell
2022-03-30 18:48:48 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 272 seconds)
2022-03-30 18:50:51 +0200 <raehik1> any insights here? can't make a PR while I don't know why it fixes a (my) problem! Cabal docs don't talk about this interaction
2022-03-30 18:50:52 +0200econo(uid147250@user/econo)
2022-03-30 18:51:10 +0200briandaed(~root@109.95.142.93.r.toneticgroup.pl)
2022-03-30 18:53:12 +0200boxscape_(~boxscape_@p4ff0be5f.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2022-03-30 18:53:27 +0200wootehfoot(~wootehfoo@user/wootehfoot)
2022-03-30 18:54:44 +0200 <sm> https://www.okapi.wiki/design#motivation, "...born from the frustration..." - sign of a good project
2022-03-30 18:54:48 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net)
2022-03-30 18:55:35 +0200justsomeguy(~justsomeg@user/justsomeguy) (Ping timeout: 260 seconds)
2022-03-30 18:56:00 +0200 <sm> "a monadic HTTP parser". I wonder what this means in practice
2022-03-30 18:56:09 +0200MajorBiscuit(~MajorBisc@c-001-013-026.client.tudelft.eduvpn.nl) (Quit: WeeChat 3.4)
2022-03-30 18:57:42 +0200 <Zemyla> Should I add zipping traversals to lens?
2022-03-30 18:57:52 +0200 <sm> the examples look very nice, but similar to other haskell web frameworks. But "This means it can be used with all Applicative, Alternative, and Monad typeclass methods, plus other Haskell idioms like parser combinators.", maybe this is new
2022-03-30 18:58:45 +0200 <sm> raehik1 I think you'll have to share lots of details
2022-03-30 18:58:55 +0200 <geekosaur> yeh, my comment about Text vs. [Char] is as someone who has yet to make use oflarge enough String-s to justify Text
2022-03-30 18:59:16 +0200 <geekosaur> I just don't do a lot of Stringy stuff in Haskell
2022-03-30 19:01:46 +0200 <Zemyla> Odd. Stringy stuff is a lot of what I do in Haskell. Parser combinators make it easy.
2022-03-30 19:02:59 +0200 <raehik1> sm: right ofc. in that pkg, `cabal build` works, but `cabal install --lib` fails with an error "include dir not found". It is found when building regularly
2022-03-30 19:02:59 +0200Vajb(~Vajb@2001:999:62:aa00:7f5a:4f10:c894:3813) (Read error: Connection reset by peer)
2022-03-30 19:03:07 +0200 <geekosaur> maybe it'd be more correct to say I don't do a lot of Stringy stuff
2022-03-30 19:03:32 +0200 <geekosaur> raehik1, what does "cabal check" say?
2022-03-30 19:03:40 +0200 <sm> @where paste
2022-03-30 19:03:40 +0200 <lambdabot> Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com
2022-03-30 19:03:51 +0200 <raehik1> oh, I actually have the same problem on an older proj of mine!
2022-03-30 19:03:52 +0200razetime(~quassel@117.254.35.251) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2022-03-30 19:04:17 +0200Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
2022-03-30 19:05:08 +0200 <raehik1> geekosaur: cabal check says nothing unusual: https://paste.tomsmeding.com/iPZFiJSp
2022-03-30 19:06:33 +0200 <sm> yes I think I get it.. okapi's handler code is more composable than most
2022-03-30 19:07:57 +0200 <geekosaur> interesting. normally it at least tries to catch things like required headers that aren't so marked. although that is admittedly harder for C than for Haskell
2022-03-30 19:09:51 +0200 <raehik1> here's the output of cabal install --lib -v https://paste.tomsmeding.com/kGWB3W91
2022-03-30 19:10:03 +0200 <sm> oh yeah, and all the handlers (so far) have no arguments, they just parse. That's different
2022-03-30 19:10:55 +0200 <geekosaur> "Warning: 'include-dirs: src/include' directory does not exist."
2022-03-30 19:11:12 +0200 <geekosaur> line 191, during configuring
2022-03-30 19:11:35 +0200skandal(~skandal@user/szahid) (Quit: ZNC 1.8.2 - https://znc.in)
2022-03-30 19:12:42 +0200 <raehik1> Yeah. Don't understand why
2022-03-30 19:13:09 +0200 <raehik1> Cabal's generated sdists don't have the include dir (of that proj, or another one where include is in cbits)
2022-03-30 19:13:45 +0200 <geekosaur> this is c2hs blowing up, I see; it might have different expectations from normal C includes
2022-03-30 19:14:29 +0200 <raehik1> geekosaur: I'm reproducing the same issue on another project that uses hsc2hs https://github.com/raehik/lzo-hs
2022-03-30 19:14:38 +0200 <raehik1> I don't rly know how they differ tho
2022-03-30 19:15:40 +0200 <geekosaur> cbits/src/include isn't the same thing as src/include, looking at that package
2022-03-30 19:16:30 +0200 <sclv> yeah looks like that pkg needs to specify adding the include dir directly
2022-03-30 19:17:14 +0200 <raehik1> geekosaur: what do you mean? both projs seem to write the same thing in the cabal file
2022-03-30 19:17:23 +0200 <sclv> include dirs are for what gets passed as include flags not what goes in the sdist
2022-03-30 19:17:24 +0200 <sclv> ?
2022-03-30 19:17:38 +0200 <raehik1> sclv: yes that's what I'm thinking
2022-03-30 19:17:57 +0200 <geekosaur> yes, it translated to an -Isrc/include as sent to c2hs
2022-03-30 19:18:05 +0200 <sclv> i guess they never tested a normal sdist workflow
2022-03-30 19:18:21 +0200 <ProfSimm> If Haskell never computes ahead of time, just aggregates expressions, does that mean every time a function runs, there's a semantic "copy' of the expression tree of that function
2022-03-30 19:18:45 +0200 <raehik1> how should I get those files placed in the sdist?
2022-03-30 19:21:12 +0200 <geekosaur> ProfSimm, (a) nothing says it can't compute ahead of time, just that it must have the same outcome as not doing so. otherwise strictness analysis would be forbidden. (b) don't understand what you mean by «semantic "copy"». it's the expression tree itself, no copying needed. purity…
2022-03-30 19:21:55 +0200 <geekosaur> but then I rarely have any idea what you're on about; you seem to have some odd notions of how things work in general
2022-03-30 19:22:25 +0200 <ProfSimm> geekosaur: yes I do
2022-03-30 19:22:52 +0200 <raehik1> another Haskell lib using cbits puts all the headers in extra-source-files. so maybe that's the intended solution! but unexpected
2022-03-30 19:22:53 +0200 <ProfSimm> geekosaur: well we have an expression tree, one time you call the function it reduces one way, then another way
2022-03-30 19:24:13 +0200 <geekosaur> yes, but it's not substituting the parameter in directly; thatparameter is part of the expression tree (think: APPLY (LAM ...) BINDING ...)
2022-03-30 19:24:47 +0200 <ProfSimm> geekosaur: I was thinking substituting directly might be a neat way to have memoization
2022-03-30 19:24:59 +0200 <ProfSimm> geekosaur: what about partial application and reduction
2022-03-30 19:25:23 +0200 <geekosaur> partial application just means youget another (LAM ...) back
2022-03-30 19:27:09 +0200 <geekosaur> not sure what you intend here by reduction, unless you mean what happens when it's fully applied. in that case it still isn't necessarily "reduced", these things happen when the result is demanded
2022-03-30 19:28:49 +0200tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
2022-03-30 19:28:53 +0200 <geekosaur> so you have a "thunk" which is an (APPLY (LAM ...) BINDING ...) waiting for something to demand the result.
2022-03-30 19:29:17 +0200napping(~brandon@65.128.43.198)
2022-03-30 19:29:21 +0200 <geekosaur> (in this case. a CAF can also be a thunk, it just isn't an APPLY)
2022-03-30 19:32:30 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2022-03-30 19:35:13 +0200wootehfoot(~wootehfoo@user/wootehfoot) (Ping timeout: 260 seconds)
2022-03-30 19:37:35 +0200 <napping> Does GHC put any useful build hashes into executables, which would be suitable for checking if a serialized Compact was made with the same executable?
2022-03-30 19:41:37 +0200 <geekosaur> portably extracting and using such would be an … adventure
2022-03-30 19:46:45 +0200 <maerwald> are there any tricks to match on deeply nested ASTs for a particular pattern?
2022-03-30 19:47:30 +0200 <maerwald> (SQL AST in this case)
2022-03-30 19:51:17 +0200 <[exa]> maerwald: by the "deeply nested AST" you mean basically a small "open" subtree or something more complicated?
2022-03-30 19:51:51 +0200 <[exa]> *by the _matching_ on deeply nested AST
2022-03-30 19:51:55 +0200 <maerwald> https://hackage.haskell.org/package/postgresql-syntax-0.4.0.2/docs/PostgresqlSyntax-Ast.html
2022-03-30 19:52:19 +0200 <maerwald> There are a thousand combinations you can see a table identifier, for example
2022-03-30 19:52:39 +0200 <[exa]> u u u uhhhhhhhhhhhh
2022-03-30 19:52:44 +0200 <maerwald> gg
2022-03-30 19:53:27 +0200mikoto-chan(~mikoto-ch@213.177.151.239) (Ping timeout: 260 seconds)
2022-03-30 19:53:59 +0200 <[exa]> ok well, probably depends on the complexity of the query
2022-03-30 19:54:11 +0200 <maerwald> the query can be arbitrarily complex :D
2022-03-30 19:54:32 +0200 <[exa]> the complexity of the match will then scale with the query complexity :D
2022-03-30 19:54:58 +0200 <maerwald> nah, I mean, at some point I'm exhaustive
2022-03-30 19:55:07 +0200 <[exa]> anyway, this is going to be ugly even with pretty advanced syb
2022-03-30 19:55:19 +0200mikoto-chan(~mikoto-ch@213.177.151.239)
2022-03-30 19:55:29 +0200 <[exa]> do you actually receive the SQL or you generate it?
2022-03-30 19:55:37 +0200Codaraxis_(~Codaraxis@user/codaraxis) (Ping timeout: 246 seconds)
2022-03-30 19:55:53 +0200 <maerwald> receive
2022-03-30 19:56:01 +0200 <maerwald> and then manipulate
2022-03-30 19:56:08 +0200 <[exa]> ok that rules out the possibility to do on a sane-complexity IR
2022-03-30 19:56:13 +0200Macbethwin(~chargen@8.21.8.253)
2022-03-30 19:57:06 +0200 <maerwald> it is rather well-defined and not that complicated... replace a table identifier with a subquery and an alias
2022-03-30 19:57:27 +0200 <maerwald> in a from clause
2022-03-30 19:57:36 +0200 <[exa]> I'd just syb
2022-03-30 19:57:51 +0200 <[exa]> sounds reasonable in this case
2022-03-30 19:58:03 +0200mbuf(~Shakthi@136.185.73.48) (Quit: Leaving)
2022-03-30 19:59:16 +0200 <maerwald> the readme is empty and points to a non-existing website
2022-03-30 19:59:18 +0200 <maerwald> very good
2022-03-30 20:00:09 +0200 <[exa]> the main issue is that the SQL model here doesn't look like it consistently lists all possible places where the reference Ident can be a table name, this looks more like you'll just need to list them
2022-03-30 20:02:19 +0200deadmarshal_(~deadmarsh@95.38.118.21) (Ping timeout: 260 seconds)
2022-03-30 20:02:45 +0200 <[exa]> like, IMO it looks like `gmapT` from the original SYB paper would do
2022-03-30 20:02:51 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2022-03-30 20:03:45 +0200alp(~alp@user/alp) (Ping timeout: 250 seconds)
2022-03-30 20:03:57 +0200 <[exa]> nowadays it's in uniplate afaik
2022-03-30 20:04:19 +0200hololeap_(~hololeap@user/hololeap)
2022-03-30 20:04:55 +0200hololeap(~hololeap@user/hololeap) (Ping timeout: 240 seconds)
2022-03-30 20:07:14 +0200 <maerwald> your regular haskell lib: no documentation, just some academic papers that you have to search for manually
2022-03-30 20:07:45 +0200vicfred(~vicfred@user/vicfred)
2022-03-30 20:07:58 +0200 <maerwald> and people still debate why Haskell is not more popular :D
2022-03-30 20:09:16 +0200jgeerds(~jgeerds@d5364b87.access.ecotel.net)
2022-03-30 20:09:21 +0200hololeap(~hololeap@user/hololeap)
2022-03-30 20:09:29 +0200 <sm> not all libs are like that. What we need is much better discoverability of libs' doc level and general production-readiness, which will create positive pressure
2022-03-30 20:10:20 +0200 <sm> "hackage, show me only class A production-ready libraries!"
2022-03-30 20:10:40 +0200 <maerwald> that would be a rather short list mostly comprised of backend libs
2022-03-30 20:10:55 +0200hololeap_(~hololeap@user/hololeap) (Ping timeout: 240 seconds)
2022-03-30 20:11:46 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2022-03-30 20:11:55 +0200 <sm> I'm not sure how short or long it is right now. That would start changing more quickly..
2022-03-30 20:12:17 +0200 <maerwald> sm: https://github.com/haskellfoundation/stability/issues/7
2022-03-30 20:13:55 +0200 <sm> thanks. I think in practice it may end up requiring a new hackage.. how's that going Hecate
2022-03-30 20:15:04 +0200 <Hecate> hello
2022-03-30 20:15:27 +0200 <Hecate> it's doing well I think
2022-03-30 20:15:33 +0200 <Hecate> considering I'm the only one on it :P
2022-03-30 20:16:30 +0200 <maerwald> sounds like an excellent burnout rate
2022-03-30 20:16:50 +0200 <dminuoso> 20:07:14 maerwald | your regular haskell lib: no documentation, just some academic papers that you have to search for manually
2022-03-30 20:17:12 +0200 <dminuoso> You forgot: You have type signatures, but with no description or explanation.
2022-03-30 20:17:27 +0200 <maerwald> yeah, types are self-explanatory, right?
2022-03-30 20:17:38 +0200 <dminuoso> I guess thats the thing, with some time spent they can be
2022-03-30 20:17:50 +0200 <dminuoso> Which results in unfortunate feedback loops
2022-03-30 20:18:10 +0200 <sm> Hecate: I think you posted a link recently, could you share again ?
2022-03-30 20:18:15 +0200 <dminuoso> If you're sufficiently advanced, types (even those of other peoples libraries) become self-explanatory.
2022-03-30 20:18:27 +0200 <maerwald> dminuoso: I don't think so :)
2022-03-30 20:18:48 +0200 <geekosaur> only some types are self-explanatory.
2022-03-30 20:18:51 +0200 <dminuoso> maerwald: My point rather is, this can easily train experienced Haskellers to not elaborate them, because they might feel they are self-explanatory.
2022-03-30 20:19:02 +0200 <dminuoso> Not that its a good idea.
2022-03-30 20:19:24 +0200 <maerwald> openFile :: FilePath -> IO Handle <-- I have a thousand questions about what this function does :)
2022-03-30 20:19:58 +0200 <dminuoso> You belong to the upper 10% to even know there's more to than just "well it opens a right, right"
2022-03-30 20:20:03 +0200 <maerwald> the reason I know what it does is because I read the entire implementation down to the windows IO manager
2022-03-30 20:20:12 +0200 <dminuoso> Note, the 10% are from my made up statistics.
2022-03-30 20:21:14 +0200 <sm> ah, https://dev.flora.pm
2022-03-30 20:22:18 +0200 <sm> showing only the class A production ready packages I see
2022-03-30 20:22:30 +0200unit73e(~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291)
2022-03-30 20:22:52 +0200 <maerwald> it looks like someone new a thing or two about CSS there
2022-03-30 20:22:56 +0200 <maerwald> *knew
2022-03-30 20:24:04 +0200 <sm> for pretty CSS you've pretty much got to pick a framework and learn that. (What's playground using ?)
2022-03-30 20:24:13 +0200 <maerwald> none
2022-03-30 20:24:32 +0200coot(~coot@213.134.190.95)
2022-03-30 20:24:44 +0200 <sm> flora is using tailwindcss it seems
2022-03-30 20:26:19 +0200 <sm> I see they call these "UI kits"
2022-03-30 20:26:56 +0200 <sm> The main difference between TailwindCSS and Bootstrap is that Tailwind CSS is not a UI kit. Unlike UI kits such as Bootstrap, Bulma, and Foundation, Tailwind CSS doesn’t have a default theme or built-in UI components. Instead, it comes with predesigned widgets you can use to build your site from scratch. Bootstrap is known for its responsiveness, whereas proponents of Tailwind CSS typically value the framework’s customizability.
2022-03-30 20:27:42 +0200 <maerwald> did you copy paste that?
2022-03-30 20:27:55 +0200 <sm> yup, from the internet
2022-03-30 20:28:02 +0200 <maerwald> amazing
2022-03-30 20:28:13 +0200epolanski(uid312403@id-312403.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
2022-03-30 20:28:40 +0200MacbethwinChargen
2022-03-30 20:28:44 +0200 <sm> whatever ui kit/css framework you pick, it must at minimum be responsive enough that your thing just works on big and small screens
2022-03-30 20:28:52 +0200 <ario> i've been meaning to give tailwind a try
2022-03-30 20:29:07 +0200vysn(~vysn@user/vysn) (Ping timeout: 250 seconds)
2022-03-30 20:29:10 +0200 <maerwald> sm: playground works on mobile I think
2022-03-30 20:30:12 +0200 <sm> maerwald: I haven't tried, but without a framework ensuring this it'll probably seem to work but you'll find problems sooner or later
2022-03-30 20:30:30 +0200 <maerwald> now I feel you're selling me tech :D
2022-03-30 20:31:26 +0200 <sm> well I am, this is a case where using some tech is justified IMHO
2022-03-30 20:31:46 +0200 <maerwald> I think tomsmeding is a fan of simplicity
2022-03-30 20:31:50 +0200 <sm> trying to make something (a) pretty and (b) looking right on all the wacky clients out there is a futile task
2022-03-30 20:32:03 +0200 <sm> by yourself with no framework, I mean
2022-03-30 20:34:08 +0200 <tomsmeding> maerwald: yes
2022-03-30 20:34:47 +0200 <tomsmeding> I'm not sure leaving responsiveness of a playground to a css framework is a good idea
2022-03-30 20:35:18 +0200 <sm> and when I say "framework", I'm thinking "include one tiny css file, *maybe* one js file, and enjoy massive benefits"
2022-03-30 20:35:27 +0200 <tomsmeding> it might work great for an article, but for this playground thing I'd not want to be at the mercy of the layout suggested by some framework
2022-03-30 20:35:52 +0200 <tomsmeding> the main pastebin site uses purecss, but that doesn't do too much responsiveness really
2022-03-30 20:35:58 +0200 <tomsmeding> though I guess it does some
2022-03-30 20:36:03 +0200 <tomsmeding> depending on what you call "responsive"
2022-03-30 20:36:59 +0200 <sm> these are lightweight things I'm talking about, not heavy handed. You use just the bits you want, usually #1 is a bit of magic to adjust layout when screens are small so you don't have to think about, implement, debug, support that yourself
2022-03-30 20:37:34 +0200 <tomsmeding> sm: what layout would you want to be adjusted how for the playground?
2022-03-30 20:37:41 +0200 <sm> so yes it's a tradeoff, just MHO that it's a good one but YMMV
2022-03-30 20:38:07 +0200alp(~alp@user/alp)
2022-03-30 20:38:11 +0200smtries it
2022-03-30 20:38:23 +0200 <tomsmeding> (I'm not against including tech, I'm just unwilling to introduce tech for the sake of it, or when there's a similarly decent solution without said tech)
2022-03-30 20:38:46 +0200Pickchea(~private@user/pickchea)
2022-03-30 20:39:26 +0200 <hololeap> have you guys tried using elm-ui? just curious
2022-03-30 20:39:30 +0200 <sm> well, look at it. On an iphone SE you can see "putStrLn" and that's about it
2022-03-30 20:39:39 +0200modnar(~modnar@shell.sonic.net)
2022-03-30 20:39:59 +0200 <sm> I think apps would typically replace a split screen with a full screen, or horizontal split in this case
2022-03-30 20:40:11 +0200 <tomsmeding> sm: right, that's what I was thinking as well
2022-03-30 20:40:25 +0200 <tomsmeding> and I'm damn sure a framework is not going to do that out of the box here for you
2022-03-30 20:40:26 +0200 <sm> and a good ui kit will do that sort of thing for you automatically
2022-03-30 20:40:29 +0200 <maerwald> we could use obelisk to build an app :D
2022-03-30 20:40:46 +0200 <dminuoso> Can we go back to GUI clients? Qt applications were *fine*, extremely snappy and have had nice animations for decades, oh and all the features are controllable by the software author.
2022-03-30 20:40:51 +0200 <dminuoso> Web has *none* of these.
2022-03-30 20:40:52 +0200 <tomsmeding> especially given that we want heights to be stable, scrolling output within the columns' containers, and a loading spinner that doesn't resize stuff
2022-03-30 20:41:02 +0200 <tomsmeding> dminuoso: yes lol
2022-03-30 20:41:17 +0200 <tomsmeding> except then nobody would use it, because if they need to install a local app for a playground, they could just as well run ghcup
2022-03-30 20:42:24 +0200 <hololeap> dminuoso: talking about types being self-explanitory: https://hackage.haskell.org/package/reflex-0.8.2.0/docs/Reflex-EventWriter-Base.html#v:sequenceDMa…
2022-03-30 20:42:34 +0200coot(~coot@213.134.190.95) (Quit: coot)
2022-03-30 20:42:43 +0200 <geekosaur> winghci still needs a replacement (and a linux/osx port :)
2022-03-30 20:43:17 +0200 <maerwald> hololeap: I like the patch type lol
2022-03-30 20:44:01 +0200 <dminuoso> hololeap: It's self evident. Do you really want to display a lack of Haskellsauce by asking me to explain that type?
2022-03-30 20:44:03 +0200coot(~coot@213.134.190.95)
2022-03-30 20:44:25 +0200 <sm> tomsmeding: https://hackmd.io should be a decent example. On a small screen, they drop the split screen mode and you toggle between view/edit
2022-03-30 20:44:25 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
2022-03-30 20:44:28 +0200 <tomsmeding> lol that type is funny
2022-03-30 20:45:02 +0200 <maerwald> the function name could be straight out of a Java library
2022-03-30 20:47:53 +0200 <dminuoso> hololeap: But yeah, that one is quite terrible. I recall one of the type safe SQL libraries having quite similar complicated types
2022-03-30 20:47:58 +0200 <dminuoso> I just dont recall which one that was
2022-03-30 20:48:25 +0200 <dminuoso> Ah I think it was beam
2022-03-30 20:48:57 +0200 <dminuoso> https://hackage.haskell.org/package/beam-core-0.9.2.1/docs/Database-Beam-Query.html#v:manyToMany_
2022-03-30 20:49:34 +0200 <dminuoso> At that point, why not go all the way and specify the sql queries at the type level. It's beyond insanity already
2022-03-30 20:49:35 +0200 <maerwald> and you really want to give US dependent types? :)
2022-03-30 20:50:31 +0200Tuplanolla(~Tuplanoll@91-159-69-98.elisa-laajakaista.fi)
2022-03-30 20:52:27 +0200doyougnu(~doyougnu@cpe-67-249-83-190.twcny.res.rr.com)
2022-03-30 20:52:34 +0200 <sm> Hecate: did you rule out sqlite for flora ?
2022-03-30 20:54:13 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Remote host closed the connection)
2022-03-30 20:54:49 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net)
2022-03-30 20:57:45 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-03-30 20:59:47 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Ping timeout: 256 seconds)
2022-03-30 21:03:20 +0200Codaraxis(~Codaraxis@user/codaraxis)
2022-03-30 21:05:51 +0200modnar(~modnar@shell.sonic.net) (Quit: No Ping reply in 180 seconds.)
2022-03-30 21:08:34 +0200modnar(~modnar@shell.sonic.net)
2022-03-30 21:10:52 +0200johnw(~johnw@2607:f6f0:3004:1:c8b4:50ff:fef8:6bf0)
2022-03-30 21:11:41 +0200gehmehgeh(~user@user/gehmehgeh)
2022-03-30 21:18:13 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 246 seconds)
2022-03-30 21:18:53 +0200 <Hecate> sm: yes
2022-03-30 21:19:31 +0200 <sm> I'm interested to know the reason.. just because the postgres requirement shrinks the pool of potential contributors
2022-03-30 21:19:44 +0200 <Hecate> sm: search doesn't work yet but most UI elements should: https://dev.flora.pm/packages/@haskell/base/4.16.0.0
2022-03-30 21:19:54 +0200 <sm> (and I have often thought of using sqlite for such apps)
2022-03-30 21:20:01 +0200dhouthoo(~dhouthoo@178-117-36-167.access.telenet.be) (Quit: WeeChat 3.4.1)
2022-03-30 21:20:24 +0200 <Hecate> sm: yes but if it rules out the people who are comfortable with the SQLite type system it's okay
2022-03-30 21:20:25 +0200 <sm> ah, there's a package. I wasn't able to find any so thought it was empty
2022-03-30 21:20:27 +0200 <Hecate> https://twitter.com/mitchellsalad/status/1361022421021696003
2022-03-30 21:20:42 +0200 <Hecate> sm: yeah I haven't implemented some UI elements
2022-03-30 21:20:51 +0200 <Hecate> https://dev.flora.pm/categories
2022-03-30 21:21:01 +0200 <Hecate> again, if you find something that doesn't work, it's normal
2022-03-30 21:21:07 +0200 <Hecate> it's not even an MVP
2022-03-30 21:22:31 +0200 <Hecate> sm: also it's pretty hard to have a read-replica with sqlite :-P
2022-03-30 21:22:52 +0200 <Hecate> and multiple applicative instances
2022-03-30 21:23:04 +0200 <sm> my current plan, should I ever be asked to make a scalable new web app, is to use persistent + sqlite at least for local dev with the option to switch to postgres in production
2022-03-30 21:23:28 +0200 <sm> I don't see sqlite's lesser type safety as an issue
2022-03-30 21:23:51 +0200 <Hecate> it's your right
2022-03-30 21:24:24 +0200 <Hecate> sm: It doesn't work
2022-03-30 21:24:44 +0200 <Hecate> because I can't test search locally then :P
2022-03-30 21:24:58 +0200 <Hecate> or I have to write in the subset of SQL that is supported by both Postgres and SQL
2022-03-30 21:25:01 +0200 <Hecate> *SQLite
2022-03-30 21:25:03 +0200 <Hecate> so no trigrams
2022-03-30 21:25:10 +0200 <sm> because with all the structure and guidance provided by the haskell layer, I can't see how I'd really screw up sqlite data in practice. Maybe I'm not seeing it
2022-03-30 21:26:34 +0200 <sm> Hecate: yes, I'd expect to be mostly using persistent / esqueleto for queries, and any lower-level ones would have to carefully be compatible with both dbs
2022-03-30 21:26:42 +0200 <sm> I saw you're using your own pg-entity ?
2022-03-30 21:26:47 +0200 <Hecate> yeah
2022-03-30 21:27:06 +0200 <sm> ah, https://hackage.haskell.org/package/pg-entity. Nice
2022-03-30 21:27:16 +0200 <Hecate> yup'
2022-03-30 21:27:24 +0200 <Hecate> although I ought to make a release
2022-03-30 21:28:23 +0200 <Hecate> sm: yeah so in the end I get no trigrams and no JSON operators
2022-03-30 21:28:37 +0200 <Hecate> I feel like I deserve a better experience than that :-P
2022-03-30 21:30:22 +0200 <sm> if I was building an industrial app I mightn't care about sqlite, but things like "a better hackage" really need to be good at onboarding contributors to succeed, I feel. Flora has gone another way for your reasons I know. But generally speaking I do think this is a pretty important aspect
2022-03-30 21:30:41 +0200 <sm> what are trigrams ?
2022-03-30 21:30:57 +0200 <tomsmeding> wha hat are tri rig igr gra ram ams
2022-03-30 21:31:07 +0200 <sm> does a hackage-like app really need such fancy features from the db ?
2022-03-30 21:32:12 +0200 <tomsmeding> I believe the common usage of trigrams in search is to break up the query into trigrams (as shown), then find all the trigrams in all the keywords, and return matches based on how many trigrams were found
2022-03-30 21:32:44 +0200 <tomsmeding> choice of 3 because (#{set of alphabetic characters})^3 is still manageable
2022-03-30 21:33:01 +0200 <sm> interesting tomsmeding, thanks
2022-03-30 21:33:39 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
2022-03-30 21:35:50 +0200 <Hecate> sm: on the contrary, they are the less fancy way of doing search in the DB
2022-03-30 21:35:58 +0200 <Hecate> they're not FTS
2022-03-30 21:36:09 +0200 <Hecate> and most certainly not equivalent to ElasticSearch
2022-03-30 21:37:00 +0200 <sm> does hackage really need more than LIKE or ~ though ?
2022-03-30 21:37:38 +0200 <Hecate> it's a badly phrased question
2022-03-30 21:38:17 +0200 <sm> oops, how so ?
2022-03-30 21:38:17 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds)
2022-03-30 21:38:41 +0200 <Hecate> what you're asking without knowing is "do we have machines powerful enough to allow the database to search through the whole dataset a high frequencies with an unoptimised technique"
2022-03-30 21:39:11 +0200 <Hecate> and that's part of what I try to avoid: Having ludicrous requirements for the hosts
2022-03-30 21:39:23 +0200 <Hecate> also sm, Flora is meant to be industrial
2022-03-30 21:39:57 +0200 <Hecate> This is why I'm thinking of having stuff like read-replicas, multiple application servers, ease of hosting, etc
2022-03-30 21:40:16 +0200 <sm> ok perhaps I'm being naive, but hackage searches.. package names ? And not that many. Isn't a dumb postgres search of those pretty fast ? And how many searches per second do you really need to support ?
2022-03-30 21:40:49 +0200 <Hecate> Hackage searches names, but apparently also synopsises and other fields
2022-03-30 21:41:20 +0200 <Hecate> sm: yeah it's not that many, around 16k
2022-03-30 21:41:52 +0200 <Hecate> also I have production experience with PostgreSQL
2022-03-30 21:41:59 +0200 <Hecate> I'm a member of the French PostgreSQL community
2022-03-30 21:42:02 +0200smtoo
2022-03-30 21:42:13 +0200 <Hecate> I have easy access to a support network that I know can deliver
2022-03-30 21:42:35 +0200 <Hecate> I don't have the resources to rebuild such a support network for 1 project
2022-03-30 21:42:36 +0200 <geekosaur> hackage searches every visible field in the index, from what I've seen
2022-03-30 21:42:44 +0200 <sm> I love postgres and manage it for work, but I know I won't set it up a postgres db on local machine for a quick contribution to a new FOSS project
2022-03-30 21:42:55 +0200 <geekosaur> (that is, hackage.org/packages/browse)
2022-03-30 21:43:13 +0200 <Hecate> sm: that being said I think I provide a docker-compose setup
2022-03-30 21:43:24 +0200 <Hecate> but again, if you don't want to install the toolchain of a project, it's okay
2022-03-30 21:43:25 +0200 <maerwald> Hecate: does pg-entity have parametrized queries?
2022-03-30 21:43:33 +0200 <Hecate> you can whisper in my ear instead :P
2022-03-30 21:43:38 +0200 <sm> docker neither (sorry :)
2022-03-30 21:43:45 +0200 <sm> yup, no worries
2022-03-30 21:43:51 +0200 <Hecate> maerwald: named parameters? nah it's using postgresql-simple under the hood
2022-03-30 21:43:57 +0200 <Hecate> and the hood is very much open
2022-03-30 21:44:01 +0200 <Hecate> so it's with '?'
2022-03-30 21:44:24 +0200 <maerwald> Hecate: https://github.com/haskellari/postgresql-simple/issues/58
2022-03-30 21:45:16 +0200 <Hecate> if tdammers implements it and phadej accepts it, I'll support it :)
2022-03-30 21:45:46 +0200`2jt(~jtomas@210.red-88-24-179.staticip.rima-tde.net) (Remote host closed the connection)
2022-03-30 21:45:49 +0200 <maerwald> the point is rather that the absence is a security issue
2022-03-30 21:46:05 +0200 <Hecate> maerwald: you're making the good point to the wrong person
2022-03-30 21:46:14 +0200 <Hecate> I have no ability to influence the development of postgresql-simple
2022-03-30 21:46:25 +0200 <Hecate> but I agree
2022-03-30 21:46:28 +0200 <Hecate> but I can't do shit
2022-03-30 21:49:25 +0200 <maerwald> is it wired deeply into postgresql-simple?
2022-03-30 21:51:11 +0200 <Hecate> no idea I don't know the internals
2022-03-30 21:53:10 +0200 <maerwald> Hecate: man, you spelled Oleg wrong :p
2022-03-30 21:53:29 +0200 <maerwald> Oleg Grerus :(
2022-03-30 21:54:27 +0200 <Hecate> uh??
2022-03-30 21:54:28 +0200 <Hecate> I did ?
2022-03-30 21:54:30 +0200 <Hecate> where?
2022-03-30 21:54:35 +0200 <maerwald> https://github.com/tchoutri/pg-entity#documentation
2022-03-30 21:55:24 +0200 <Hecate> fixed, thanks
2022-03-30 21:57:43 +0200doyougnu(~doyougnu@cpe-67-249-83-190.twcny.res.rr.com) (Ping timeout: 250 seconds)
2022-03-30 21:58:10 +0200 <maerwald> I miss the hackage bot. I feel I should have known about this package
2022-03-30 21:59:49 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-03-30 21:59:49 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-03-30 21:59:49 +0200wroathe(~wroathe@user/wroathe)
2022-03-30 22:01:04 +0200 <sm> I do too
2022-03-30 22:01:43 +0200 <maerwald> it wasn't really that noisy was it?
2022-03-30 22:02:42 +0200 <sm> not that noisy. Sometimes more than others. It had various limits.
2022-03-30 22:03:05 +0200 <sm> it does change the feel of the room a bit
2022-03-30 22:03:27 +0200 <sm> new more compact output could work better
2022-03-30 22:04:09 +0200haris(~haris@69.169.3.81)
2022-03-30 22:04:11 +0200 <Hecate> I have it on my Fediverse feed
2022-03-30 22:04:12 +0200 <Hecate> :P
2022-03-30 22:04:13 +0200 <maerwald> collect pkgs in interval of 5 minutes and print a paste if there are too many?
2022-03-30 22:04:22 +0200zmt00(~zmt00@user/zmt00) (Read error: Connection reset by peer)
2022-03-30 22:05:47 +0200zmt00(~zmt00@user/zmt00)
2022-03-30 22:05:48 +0200 <sm> * new packages uploaded: faktory, graphula, hspec-expectations-json, hspec-junit-formatter, ...
2022-03-30 22:06:16 +0200 <geekosaur> could even remove "uploaded"
2022-03-30 22:07:25 +0200 <sm> if anyone wants to revive the rss2irc-based one that I ran, I have pointers
2022-03-30 22:08:01 +0200 <sm> it could also just announce new packages, not updated ones
2022-03-30 22:08:23 +0200ProfSimm(~ProfSimm@87.227.196.109) (Remote host closed the connection)
2022-03-30 22:08:42 +0200ProfSimm(~ProfSimm@87.227.196.109)
2022-03-30 22:10:23 +0200 <maerwald> new packages and package takeovers :p
2022-03-30 22:10:41 +0200pavonia(~user@user/siracusa)
2022-03-30 22:12:00 +0200unit73e(~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) (Quit: Leaving)
2022-03-30 22:12:26 +0200kenran(~kenran@200116b82bc26800d8fb2d8773389650.dip.versatel-1u1.de)
2022-03-30 22:13:19 +0200Lord_of_Life_(~Lord@user/lord-of-life/x-2819915)
2022-03-30 22:13:55 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 260 seconds)
2022-03-30 22:14:37 +0200Lord_of_Life_Lord_of_Life
2022-03-30 22:16:56 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
2022-03-30 22:24:55 +0200Codaraxis(~Codaraxis@user/codaraxis) (Remote host closed the connection)
2022-03-30 22:25:21 +0200Codaraxis(~Codaraxis@user/codaraxis)
2022-03-30 22:28:02 +0200 <dmj`> question, is there a package that will convert all imports to be explicit (and rewrite all uses of types, functions to be qualified) in an entire codebase?
2022-03-30 22:28:25 +0200 <dmj`> asking for a friend
2022-03-30 22:29:40 +0200 <maerwald> HLS can at least do the first part, but converting to qualified use not I think
2022-03-30 22:29:57 +0200motherfsck(~motherfsc@user/motherfsck)
2022-03-30 22:30:13 +0200mikoto-chan(~mikoto-ch@213.177.151.239) (Ping timeout: 260 seconds)
2022-03-30 22:32:01 +0200 <Hecate> HLS can do the converting to qualified
2022-03-30 22:32:06 +0200 <Hecate> but you'll have to script it
2022-03-30 22:34:35 +0200acidjnk(~acidjnk@p200300d0c7049f58687650f0568aa4d7.dip0.t-ipconnect.de)
2022-03-30 22:34:57 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net)
2022-03-30 22:36:47 +0200raehik1(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds)
2022-03-30 22:39:31 +0200coot(~coot@213.134.190.95) (Quit: coot)
2022-03-30 22:40:03 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Ping timeout: 260 seconds)
2022-03-30 22:42:27 +0200briandaed(~root@109.95.142.93.r.toneticgroup.pl) (Ping timeout: 260 seconds)
2022-03-30 22:43:37 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 246 seconds)
2022-03-30 22:44:41 +0200raehik1(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2022-03-30 22:47:28 +0200 <dmj`> Hecate: does it just convert the import? or does it actually rewrite the usage sites as well
2022-03-30 22:48:04 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2022-03-30 22:54:43 +0200Codaraxis(~Codaraxis@user/codaraxis) (Remote host closed the connection)
2022-03-30 22:54:59 +0200machinedgod(~machinedg@24.105.81.50) (Ping timeout: 260 seconds)
2022-03-30 22:55:14 +0200Codaraxis(~Codaraxis@user/codaraxis)
2022-03-30 22:57:16 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net)
2022-03-30 22:57:43 +0200SobiX(~SobiX@83.120.59.40)
2022-03-30 22:59:36 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 272 seconds)
2022-03-30 22:59:57 +0200SobiX(~SobiX@83.120.59.40) ()
2022-03-30 23:01:29 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-03-30 23:02:46 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net) (Ping timeout: 272 seconds)
2022-03-30 23:03:24 +0200 <dmj`> Hecate: I think this would be a cool standalone static analysis tool
2022-03-30 23:03:54 +0200InstX1(~Liam@2601:6c4:4080:3f80:edd7:b0a0:789:3ae4)
2022-03-30 23:07:03 +0200Inst(~Liam@2601:6c4:4080:3f80:6050:16ec:fe01:4f97) (Ping timeout: 250 seconds)
2022-03-30 23:07:24 +0200 <Hecate> dmj`: you activate it on a call-site in particular actually
2022-03-30 23:07:26 +0200 <Hecate> but again
2022-03-30 23:07:34 +0200 <Hecate> that's the "interactive" usage
2022-03-30 23:07:41 +0200 <Hecate> idk about scripting
2022-03-30 23:09:56 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 245 seconds)
2022-03-30 23:10:01 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Quit: ZNC - https://znc.in)
2022-03-30 23:10:48 +0200 <monochrom> dmj`: ghc -ddump-minimal-imports can help.
2022-03-30 23:11:02 +0200 <InstX1> what is it called
2022-03-30 23:11:02 +0200 <monochrom> It doesn't add "qualified" though.
2022-03-30 23:11:13 +0200 <InstX1> in haskell, when you create a record that's absorbed by a function interface?
2022-03-30 23:11:24 +0200 <monochrom> But it converts "import Data.List" to "import Data.List (sort)" for example.
2022-03-30 23:11:41 +0200 <monochrom> even adds "import Prelude (length)"
2022-03-30 23:12:01 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-03-30 23:13:13 +0200 <geekosaur> InstX1, I don't understand your question. Can you show an example?
2022-03-30 23:13:31 +0200 <InstX1> umm, i defined a record via data
2022-03-30 23:13:35 +0200 <InstX1> then created a prototype of that record
2022-03-30 23:13:57 +0200 <InstX1> then i had a function interface for a bunch of functions that demanded complex arguments to be fed to them constantly
2022-03-30 23:14:07 +0200takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2022-03-30 23:14:08 +0200 <InstX1> the prototype basically set defaults
2022-03-30 23:14:32 +0200 <InstX1> so i called the functions via the function interface by feeding the function interface the record
2022-03-30 23:14:33 +0200 <geekosaur> oh.I don't think we have a specific name for that
2022-03-30 23:14:40 +0200 <InstX1> is that a bad design pattern?
2022-03-30 23:14:56 +0200 <geekosaur> it kinda serves the same purpose as a keyword interface to a function, though
2022-03-30 23:15:11 +0200 <abastro[m]> Function interface?
2022-03-30 23:15:21 +0200 <geekosaur> no, just we don't necessarily g;lorify our design patterns with names, or even with "design pattern"
2022-03-30 23:15:28 +0200 <geekosaur> it's just good coding style
2022-03-30 23:15:36 +0200 <monochrom> Generally we don't waste time coining names. But in this case I wouldn't mind hijacking "named parameters" and "default parameters".
2022-03-30 23:16:10 +0200 <abastro[m]> What does function interface mean here?
2022-03-30 23:16:11 +0200 <InstX1> there's a bunch of cool design patterns that deserve names, like tuple recursion of a list to be split
2022-03-30 23:16:22 +0200 <dmj`> monochrom: that's exactly what I go for, but I'd still need some kind of source rewriting tool, thinking about haskell-src-exts ... probably still good
2022-03-30 23:16:25 +0200 <InstX1> the function interface calls the underlying function and feeds it inputs to satisfy the arguments
2022-03-30 23:16:26 +0200 <monochrom> You can safely s/interface// :)
2022-03-30 23:16:32 +0200yauhsien(~yauhsien@61-231-60-85.dynamic-ip.hinet.net)
2022-03-30 23:16:39 +0200 <InstX1> i somehow think the underlying function was poorly designed
2022-03-30 23:16:55 +0200 <InstX1> returns a IO (Maybe [Text])
2022-03-30 23:17:09 +0200 <dmj`> monochrom: -ddump-minimal-imports would give me a list of all types / functions that need to be prefixed ... then I just gotta parse that module body and adjust the usage sites
2022-03-30 23:17:28 +0200 <geekosaur> no, it's just a convenient way to pass arguments with defaults
2022-03-30 23:17:34 +0200 <monochrom> Yikes, that's a lot of yak shaving.
2022-03-30 23:18:15 +0200 <InstX1> can i ask another stupid question?
2022-03-30 23:18:22 +0200 <InstX1> is FP about dataflows?
2022-03-30 23:18:24 +0200 <geekosaur> and the defaults can differ (see for example how dynamicLog gets used in xmonad, starting with a default that you can pick from a list of predefined ones)
2022-03-30 23:18:46 +0200 <monochrom> It seems strange to universally make everything qualified, I guess that's why other people haven't implemented it.
2022-03-30 23:19:54 +0200 <monochrom> No FP is not about dataflows. Though they do overlap.
2022-03-30 23:19:55 +0200 <dmj`> monochrom: it is a tad odd, but this project has a /ton/ of types, and some modules have been duplicated with only slight modifications (releasing a new endpoint version)
2022-03-30 23:20:15 +0200Chargenmacbethwin
2022-03-30 23:21:47 +0200 <abastro[m]> So by function interface mean higher-order functions
2022-03-30 23:22:28 +0200 <monochrom> Arrow does scream like "I am a dataflow language" for example. But Arrow is still not all of FP.
2022-03-30 23:22:57 +0200 <abastro[m]> Arrow?
2022-03-30 23:23:26 +0200 <abastro[m]> Hm, do you mean using Arrow instead of Monad?
2022-03-30 23:23:28 +0200 <monochrom> Control.Arrow for starters. And then it gets better with the proc-do notation for Arrow.
2022-03-30 23:23:43 +0200 <monochrom> Oh Monad obviously exceeds dataflow.
2022-03-30 23:23:52 +0200 <abastro[m]> `proc-do`, I see
2022-03-30 23:24:16 +0200 <abastro[m]> Personally never tried Arrow programming
2022-03-30 23:24:18 +0200 <geekosaur> in fact Arrow is not very widely used these days
2022-03-30 23:24:37 +0200 <geekosaur> I don't often see it, beyond people using >>> or first
2022-03-30 23:25:07 +0200 <monochrom> And >>> was demoted to just Category so you don't need to know Arrow. :)
2022-03-30 23:25:30 +0200 <geekosaur> and first/second to Profunctor
2022-03-30 23:25:41 +0200 <tomsmeding> or Bifunctor
2022-03-30 23:25:50 +0200 <tomsmeding> (which is in base)
2022-03-30 23:25:59 +0200 <abastro[m]> > :t (>>>)
2022-03-30 23:26:00 +0200 <lambdabot> <hint>:1:1: error: parse error on input ‘:’
2022-03-30 23:26:04 +0200 <tomsmeding> :t (>>>)
2022-03-30 23:26:06 +0200 <lambdabot> forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k). Category cat => cat a b -> cat b c -> cat a c
2022-03-30 23:26:11 +0200zer0bitz(~zer0bitz@2001:2003:f750:a200:88a0:fb04:2d2:c434) (Ping timeout: 245 seconds)
2022-03-30 23:26:12 +0200 <tomsmeding> forward function composition
2022-03-30 23:26:13 +0200 <abastro[m]> Oh
2022-03-30 23:26:20 +0200 <monochrom> Some greedy capitalist investment firm bought Arrow and split it into parts for sale >:)
2022-03-30 23:26:21 +0200 <abastro[m]> So.. reverse (.)?
2022-03-30 23:26:29 +0200 <tomsmeding> :t flip (.)
2022-03-30 23:26:30 +0200 <lambdabot> (a -> b) -> (b -> c) -> a -> c
2022-03-30 23:26:34 +0200 <geekosaur> % :t (>>>) @((->) _)
2022-03-30 23:26:34 +0200 <yahb> geekosaur: ; <interactive>:1:9: error:; * Couldn't match kind `*' with `* -> *'; Expected kind `* -> * -> *', but `(->) _' has kind `* -> *'; * In the type `((->) _)'; In the expression: (>>>) @((->) _)
2022-03-30 23:26:37 +0200 <abastro[m]> Wait wasn't that what `&` does?
2022-03-30 23:26:43 +0200 <tomsmeding> except generalised over -> like things
2022-03-30 23:26:51 +0200 <geekosaur> & is flipped ($) iirc?
2022-03-30 23:26:52 +0200 <tomsmeding> abastro[m]: (&) is to ($) as (>>>) is to (.)
2022-03-30 23:27:05 +0200 <tomsmeding> and (<<<) == (.)
2022-03-30 23:27:14 +0200 <abastro[m]> Duh me
2022-03-30 23:27:18 +0200 <abastro[m]> Now I see...
2022-03-30 23:27:36 +0200 <abastro[m]> How could I confuse (.) and ($) is out of mind to ke
2022-03-30 23:27:40 +0200 <abastro[m]> To me*
2022-03-30 23:28:32 +0200 <abastro[m]> Tbf, I heard Arrow is great if you also want to give some info about the "procedure" without consuming input
2022-03-30 23:28:42 +0200 <geekosaur> and to serious-ify monochrom's observation, the useful parts of Arrow went to Category, Profunctor, Bifunctor, and Applicative. much of the rest is ruined by `arr` being mandatory
2022-03-30 23:28:52 +0200 <abastro[m]> `a -> m b` cannot give you any info without consuming input `a`
2022-03-30 23:29:13 +0200 <abastro[m]> `Profunctor`?
2022-03-30 23:29:38 +0200mc47(~mc47@xmonad/TheMC47) (Remote host closed the connection)
2022-03-30 23:29:56 +0200 <abastro[m]> @hoogle Profunctor
2022-03-30 23:29:57 +0200 <lambdabot> Control.Lens.Combinators class Profunctor (p :: Type -> Type -> Type)
2022-03-30 23:29:57 +0200 <lambdabot> Control.Lens.Iso class Profunctor (p :: Type -> Type -> Type)
2022-03-30 23:29:57 +0200 <lambdabot> module Data.Profunctor
2022-03-30 23:30:53 +0200 <abastro[m]> Oh you don't mean base
2022-03-30 23:31:05 +0200 <geekosaur> no, I'd forgotten Profunctor wasn't in base yet
2022-03-30 23:31:13 +0200 <abastro[m]> I thought you mean Profunctor is in base
2022-03-30 23:31:17 +0200 <abastro[m]> Oh
2022-03-30 23:31:18 +0200 <geekosaur> (if ever)
2022-03-30 23:32:05 +0200 <abastro[m]> Btw it is interesting how Category has general type signature
2022-03-30 23:32:28 +0200 <janus> geekosaur: do you know if there is a monomorphic (&&&) somewhere?
2022-03-30 23:32:49 +0200 <geekosaur> I don't knowof one
2022-03-30 23:32:58 +0200 <abastro[m]> Perhaps generalized monad could be defined with it.
2022-03-30 23:33:57 +0200 <geekosaur> I think generalized monads have been defined with it. outside base, of course
2022-03-30 23:34:38 +0200 <geekosaur> there are several implementations of indexed monads on hackage iirc
2022-03-30 23:35:19 +0200 <geekosaur> whether they have a full CT monad definition somewhere I don't know
2022-03-30 23:36:18 +0200merijn(~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl)
2022-03-30 23:36:35 +0200 <abastro[m]> Isn't CT monad simpler than indexed monads
2022-03-30 23:37:12 +0200cosimone(~user@93-44-187-176.ip98.fastwebnet.it) (Quit: ERC (IRC client for Emacs 27.1))
2022-03-30 23:38:04 +0200 <johnw> given thata "CT monad" can be defined in multiple ways, I'm not sure how to understand that question
2022-03-30 23:38:44 +0200michalz(~michalz@185.246.204.107) (Remote host closed the connection)
2022-03-30 23:41:49 +0200 <abastro[m]> Ah I forgot that `pure` and `join` in CT monad requires natural transformation
2022-03-30 23:42:01 +0200alp(~alp@user/alp) (Ping timeout: 245 seconds)
2022-03-30 23:42:37 +0200gehmehgeh(~user@user/gehmehgeh) (Quit: Leaving)
2022-03-30 23:42:47 +0200kenran(~kenran@200116b82bc26800d8fb2d8773389650.dip.versatel-1u1.de) (Quit: WeeChat info:version)
2022-03-30 23:42:55 +0200wyrd(~wyrd@gateway/tor-sasl/wyrd) (Ping timeout: 240 seconds)
2022-03-30 23:44:13 +0200 <abastro[m]> Perhaps one could get by with
2022-03-30 23:44:14 +0200 <abastro[m]> `pure :: cat a (m a)`
2022-03-30 23:44:14 +0200 <abastro[m]> `join :: cat (m (m a)) (m a)`
2022-03-30 23:45:07 +0200wyrd(~wyrd@gateway/tor-sasl/wyrd)
2022-03-30 23:47:21 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2022-03-30 23:48:44 +0200 <johnw> well, that's another way from that perspective
2022-03-30 23:49:04 +0200 <johnw> there's also: arrows of the Kleisli category, monoid objects in the category of endofunctors, and the operad-based definition
2022-03-30 23:49:29 +0200 <dolio> The important question is: what's the point?
2022-03-30 23:49:35 +0200 <johnw> the adjunction-composite definition isn't quite universal enough to established what a monad IS, more than one simply always exists in that case
2022-03-30 23:49:41 +0200Graham31415(~Graham@user/Graham31415) (Read error: Connection reset by peer)
2022-03-30 23:50:54 +0200Graham31415(~Graham@user/Graham31415)
2022-03-30 23:51:56 +0200 <johnw> dolio: seems oddly out of place for a discussion about CT monads :)
2022-03-30 23:52:40 +0200Midjak(~Midjak@82.66.147.146) (Quit: Leaving)
2022-03-30 23:55:44 +0200hololeap_(~hololeap@user/hololeap)
2022-03-30 23:56:55 +0200hololeap(~hololeap@user/hololeap) (Ping timeout: 240 seconds)
2022-03-30 23:58:45 +0200 <abastro[m]> Oh, so other definitions exist
2022-03-30 23:59:06 +0200 <abastro[m]> Btw I think https://hackage.haskell.org/package/category does what I wanted, but it is somehow deprecated
2022-03-30 23:59:15 +0200 <abastro[m]> I wonder why..