2021/09/25

2021-09-25 00:00:03 +0200Gurkenglas(~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Read error: Connection reset by peer)
2021-09-25 00:00:26 +0200MQ-17J(~MQ-17J@8.21.10.6)
2021-09-25 00:00:27 +0200Gurkenglas(~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de)
2021-09-25 00:02:53 +0200michalz(~michalz@185.246.204.61) (Remote host closed the connection)
2021-09-25 00:04:23 +0200Pickchea(~private@user/pickchea) (Quit: Leaving)
2021-09-25 00:04:36 +0200wroathe(~wroathe@96-88-30-181-static.hfc.comcastbusiness.net)
2021-09-25 00:04:36 +0200wroathe(~wroathe@96-88-30-181-static.hfc.comcastbusiness.net) (Changing host)
2021-09-25 00:04:36 +0200wroathe(~wroathe@user/wroathe)
2021-09-25 00:08:38 +0200bontaq(~user@ool-45779fe5.dyn.optonline.net)
2021-09-25 00:08:56 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 252 seconds)
2021-09-25 00:10:59 +0200wroathe(~wroathe@user/wroathe)
2021-09-25 00:12:58 +0200vysn(~vysn@user/vysn) (Ping timeout: 260 seconds)
2021-09-25 00:12:58 +0200Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
2021-09-25 00:14:38 +0200__monty__(~toonn@user/toonn) (Quit: leaving)
2021-09-25 00:15:29 +0200Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
2021-09-25 00:16:11 +0200Gurkenglas(~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Quit: Leaving)
2021-09-25 00:17:11 +0200vysn(~vysn@user/vysn)
2021-09-25 00:19:18 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-09-25 00:31:16 +0200_xor(~xor@74.215.232.67) (Quit: brb)
2021-09-25 00:31:58 +0200xff0x(~xff0x@2001:1a81:5287:3100:96a7:c495:38fd:b41b) (Ping timeout: 252 seconds)
2021-09-25 00:32:14 +0200_xor(~xor@74.215.232.67)
2021-09-25 00:32:33 +0200xff0x(~xff0x@2001:1a81:5287:3100:448c:6d89:40d5:fb1d)
2021-09-25 00:38:06 +0200kimjetwav(~user@2607:fea8:235f:9730:8d3b:ad5a:287:4c82)
2021-09-25 00:39:15 +0200hololeap. o ( hyperdimensional modem where each network port is a different timestream )
2021-09-25 00:40:30 +0200 <hololeap> if the cat sends junk to libera on all timestreams, you know it's a metacat
2021-09-25 00:40:48 +0200daDude(~daDude@cpc91646-hart11-2-0-cust432.11-3.cable.virginm.net)
2021-09-25 00:41:05 +0200 <geekosaur> all cats are metacats :þ
2021-09-25 00:41:23 +0200 <hololeap> *queue sci-fi theremin stuff*
2021-09-25 00:42:22 +0200chomwitt(~chomwitt@2a02:587:dc0a:5800:12c3:7bff:fe6d:d374) (Ping timeout: 260 seconds)
2021-09-25 00:46:22 +0200hatds(~hatds@c-107-4-136-72.hsd1.mn.comcast.net)
2021-09-25 00:48:43 +0200tromp(~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2021-09-25 00:49:49 +0200Tuplanolla(~Tuplanoll@91-159-69-50.elisa-laajakaista.fi)
2021-09-25 00:49:50 +0200 <hatds> I'm using cabal for an otherwise simple throwaway project that compiles into a .exe. How can I instruct cabal to copy the executable to the root folder (where the .cabal file is) each time it builds?
2021-09-25 00:53:48 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
2021-09-25 00:53:52 +0200 <hpc> --bindir=.
2021-09-25 00:54:03 +0200 <hpc> probably
2021-09-25 00:54:25 +0200 <hpc> i haven't ever had to use it, but that looks right
2021-09-25 00:54:43 +0200alzgh(~alzgh@user/alzgh) (Remote host closed the connection)
2021-09-25 00:55:02 +0200alzgh(~alzgh@user/alzgh)
2021-09-25 00:55:16 +0200vysn(~vysn@user/vysn) (Remote host closed the connection)
2021-09-25 00:56:04 +0200rawles(~o@user/rawles) (Quit: -)
2021-09-25 00:56:22 +0200tommd(~tommd@75-164-130-101.ptld.qwest.net) (Ping timeout: 260 seconds)
2021-09-25 00:57:17 +0200tommd(~tommd@75-164-130-101.ptld.qwest.net)
2021-09-25 00:58:43 +0200Brumaire(~quassel@81-64-14-121.rev.numericable.fr)
2021-09-25 00:59:40 +0200 <hatds> @hpc it accepts and recognizes "--bindir=.", but it doesn't seem to do anything
2021-09-25 00:59:40 +0200 <lambdabot> Maybe you meant: src rc pl ghc
2021-09-25 00:59:46 +0200phma(~phma@host-67-44-208-122.hnremote.net) (Read error: Connection reset by peer)
2021-09-25 01:00:17 +0200phma(~phma@host-67-44-208-122.hnremote.net)
2021-09-25 01:00:43 +0200max22-(~maxime@2a01cb08833598006032d61cd2b0f81d.ipv6.abo.wanadoo.fr) (Quit: Leaving)
2021-09-25 01:01:12 +0200 <hpc> hatds: are you doing cabal build or cabal install?
2021-09-25 01:01:19 +0200 <hpc> i got that out of "cabal build --help"
2021-09-25 01:01:24 +0200 <hatds> cabal build
2021-09-25 01:01:25 +0200phma(~phma@host-67-44-208-122.hnremote.net) (Read error: Connection reset by peer)
2021-09-25 01:01:30 +0200 <hpc> no clue then
2021-09-25 01:01:58 +0200 <hpc> maybe write some powershell that copies the binary back out?
2021-09-25 01:02:06 +0200phma(~phma@host-67-44-208-122.hnremote.net)
2021-09-25 01:02:17 +0200tommd(~tommd@75-164-130-101.ptld.qwest.net) (Ping timeout: 252 seconds)
2021-09-25 01:02:48 +0200 <hatds> heh
2021-09-25 01:02:54 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2021-09-25 01:03:11 +0200 <hpc> i have a lot of "i give up" bash scripts, myself :P
2021-09-25 01:03:50 +0200 <awpr> wait isn't the difference between build and install precisely that install copies binaries and build doesn't?
2021-09-25 01:03:57 +0200machinedgod(~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 265 seconds)
2021-09-25 01:04:51 +0200 <hpc> install registers the package and copies things to a global or per-user directory
2021-09-25 01:05:06 +0200 <hpc> build still has to put the binaries somewhere, and you can set where that is
2021-09-25 01:05:25 +0200 <hpc> it's like -o in gcc
2021-09-25 01:05:33 +0200 <hpc> except not working apparently
2021-09-25 01:05:36 +0200 <hatds> does install still "register" something when it is just an executable?
2021-09-25 01:05:39 +0200 <awpr> `--bindir=DIR installation directory for executables`
2021-09-25 01:05:49 +0200 <awpr> that sounds like it should have no effect if you're not installing
2021-09-25 01:05:58 +0200 <hpc> oh, hmm, maybe?
2021-09-25 01:06:01 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 252 seconds)
2021-09-25 01:06:08 +0200 <hpc> odd that it would show up under cabal build --help then
2021-09-25 01:08:53 +0200Brumaire(~quassel@81-64-14-121.rev.numericable.fr) (Ping timeout: 252 seconds)
2021-09-25 01:10:00 +0200alzgh(~alzgh@user/alzgh) (Remote host closed the connection)
2021-09-25 01:10:21 +0200 <geekosaur> unless it affects Paths.hs?
2021-09-25 01:10:37 +0200terrorjack(~terrorjac@ec2-35-181-134-114.eu-west-3.compute.amazonaws.com)
2021-09-25 01:10:57 +0200 <hatds> "cabal install" with "--installdir=." works at least
2021-09-25 01:15:49 +0200yauhsien(~yauhsien@61-231-35-247.dynamic-ip.hinet.net)
2021-09-25 01:20:19 +0200madjestic(~madjestic@88-159-247-120.fixed.kpn.net) (Ping timeout: 252 seconds)
2021-09-25 01:20:59 +0200yauhsien(~yauhsien@61-231-35-247.dynamic-ip.hinet.net) (Ping timeout: 252 seconds)
2021-09-25 01:21:10 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-09-25 01:21:10 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
2021-09-25 01:21:10 +0200wroathe(~wroathe@user/wroathe)
2021-09-25 01:22:11 +0200smitop(~smitop@user/smitop) (Remote host closed the connection)
2021-09-25 01:24:07 +0200smitop(~smitop@user/smitop)
2021-09-25 01:24:46 +0200karim(uid519758@id-519758.helmsley.irccloud.com)
2021-09-25 01:29:47 +0200justsomeguy(~justsomeg@user/justsomeguy) (Quit: WeeChat 3.2)
2021-09-25 01:37:03 +0200 <monochrom> It's --installdir= indeed. --bindir is for a bygone era.
2021-09-25 01:37:55 +0200 <hpc> ah
2021-09-25 01:38:05 +0200 <hpc> it's easy to forget that even haskell sometimes has a bit of a fossil record
2021-09-25 01:38:17 +0200 <monochrom> And watch out for the default "is it copying or is it symlinking?". And the default "I won't replace, it's oh so safer".
2021-09-25 01:38:40 +0200 <monochrom> On both counts the defaults are wrong.
2021-09-25 01:39:47 +0200 <monochrom> The default on "I won't replace" disrespects that if you bother to enter "cabal install the exe" you have very much confirmed that you want to replace.
2021-09-25 01:41:07 +0200 <monochrom> The default on "I make a symlink, I won't copy" disrespects the reality that it is symlinking to what you will consider ephemeral build files that one day you will delete and clean up.
2021-09-25 01:41:46 +0200MQ-17J(~MQ-17J@8.21.10.6) (Ping timeout: 252 seconds)
2021-09-25 01:42:34 +0200 <monochrom> On top of that, the symlinking misfeature was also a blocking factor in supporting Windows.
2021-09-25 01:43:40 +0200 <monochrom> In retrospect quite frankly why would anyone bother to even offer the choice of symlinking. No one would need it, no one should use it, and it would and did block Windows users.
2021-09-25 01:44:19 +0200 <hpc> better than hardlinking i guess :D
2021-09-25 01:45:03 +0200 <geekosaur> hardlinking across directories doesn't even work on some filesystems
2021-09-25 01:45:18 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com)
2021-09-25 01:46:20 +0200machinedgod(~machinedg@24.105.81.50)
2021-09-25 01:46:36 +0200 <hpc> my last job had to deal with a system where filesystems were lazily mounted
2021-09-25 01:46:46 +0200machinedgod(~machinedg@24.105.81.50) (Remote host closed the connection)
2021-09-25 01:46:58 +0200 <hpc> you had to ssh in, authenticate with this weird thing i can only describe as the 1975 version of 2fa, and then run "find /"
2021-09-25 01:47:23 +0200 <hpc> because not every operation worked to trigger mounting the filesystems
2021-09-25 01:47:35 +0200 <monochrom> Would "ls /tmp/x" work?
2021-09-25 01:47:55 +0200 <hpc> it wasn't just /tmp
2021-09-25 01:47:58 +0200 <geekosaur> presumably only for /and /tmp
2021-09-25 01:48:01 +0200 <hpc> these were real disk filesystems
2021-09-25 01:48:04 +0200 <monochrom> Yikes
2021-09-25 01:48:05 +0200 <hpc> mounted wherever
2021-09-25 01:48:27 +0200 <hpc> imagine having to ls /var/www/html before starting httpd
2021-09-25 01:48:46 +0200machinedgod(~machinedg@24.105.81.50)
2021-09-25 01:48:48 +0200 <monochrom> Now you've got me wondering what does "1975 2fa" means :)
2021-09-25 01:49:12 +0200 <monochrom> Did it involve walking up to someone else's desk and asking for permission in person?
2021-09-25 01:49:15 +0200 <hpc> i don't remember much of it at all, but it was like you had something on one system
2021-09-25 01:49:21 +0200 <hpc> you ssh in, and it prints a 6 digit number
2021-09-25 01:49:32 +0200 <hpc> you type that into the other program, and it prints out another 6 digit number
2021-09-25 01:49:36 +0200 <hpc> and you type that in
2021-09-25 01:49:42 +0200 <geekosaur> ow
2021-09-25 01:50:01 +0200 <monochrom> Interesting.
2021-09-25 01:50:20 +0200 <monochrom> Did you cryptanalyse reverse-engineer the mapping?
2021-09-25 01:50:28 +0200 <monochrom> I mean >:)
2021-09-25 01:50:31 +0200 <hpc> heh
2021-09-25 01:51:18 +0200 <hpc> i luckily never had to deal with it myself
2021-09-25 01:51:40 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Ping timeout: 252 seconds)
2021-09-25 01:51:48 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 265 seconds)
2021-09-25 01:53:33 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2021-09-25 01:55:51 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com)
2021-09-25 01:56:00 +0200 <monochrom> In Haskell.Love, Andrew Boardman's "historical futurism" talk spent a little time relating an old, ad hoc, very personal, version control system that an old company used.
2021-09-25 01:56:39 +0200 <monochrom> I guess as part of illustrating "if you become complacent with your existing tools, you will block new blood".
2021-09-25 01:57:01 +0200 <monochrom> So, you would put your commit/patch on a floppy diskette.
2021-09-25 01:57:04 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2021-09-25 01:57:40 +0200 <monochrom> You would bring it to a dedicated desk for loading up your patch and performing the merge and the conflict resolution.
2021-09-25 01:58:06 +0200 <monochrom> So very nicely the dedicated desk served as a very physical, very personal mutex.
2021-09-25 01:58:11 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2021-09-25 01:58:33 +0200 <monochrom> Clearly it was clumsy. But it was also good enough. No one would have enough incentive to change it.
2021-09-25 01:59:06 +0200 <hpc> in manufacturing they call that a hardware interlock :D
2021-09-25 01:59:15 +0200 <monochrom> He also took the time to explain "floppy diskettes" for the young people who may have no idea what it would mean :)
2021-09-25 01:59:29 +0200 <geekosaur> heh
2021-09-25 02:00:00 +0200 <geekosaur> 8" or 5¼"?
2021-09-25 02:00:10 +0200 <monochrom> Although, I think he botched the floppy diskette explanation. I think it's more effective to say "imagine today you are required to put your files on a thumb drive and bring it to a dedicated computer in person".
2021-09-25 02:00:35 +0200 <monochrom> Might even be 3.5" in his case, I think, IIRC.
2021-09-25 02:00:37 +0200xsperry(~as@user/xsperry)
2021-09-25 02:01:41 +0200 <hpc> i enjoyed explaining core rope memory to a younger coworker
2021-09-25 02:10:45 +0200daDude(~daDude@cpc91646-hart11-2-0-cust432.11-3.cable.virginm.net) (Quit: Client closed)
2021-09-25 02:12:46 +0200n3t(n3t@s45.mydevil.net) (Changing host)
2021-09-25 02:12:46 +0200n3t(n3t@user/n3t)
2021-09-25 02:12:51 +0200smchecks for that talk on youtube, not yet
2021-09-25 02:13:05 +0200_bin(~bin@user/bin/x-1583188) (Quit: ZNC - https://znc.in)
2021-09-25 02:13:33 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Ping timeout: 265 seconds)
2021-09-25 02:16:50 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com)
2021-09-25 02:21:51 +0200geekosaur(~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
2021-09-25 02:22:13 +0200geekosaur(~geekosaur@xmonad/geekosaur)
2021-09-25 02:27:33 +0200statusbot(~statusbot@ec2-34-198-122-184.compute-1.amazonaws.com) (Remote host closed the connection)
2021-09-25 02:27:48 +0200statusbot(~statusbot@ec2-34-198-122-184.compute-1.amazonaws.com)
2021-09-25 02:34:13 +0200Tuplanolla(~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) (Quit: Leaving.)
2021-09-25 02:36:18 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Quit: WeeChat 3.2.1)
2021-09-25 02:37:48 +0200hatds(~hatds@c-107-4-136-72.hsd1.mn.comcast.net) (Quit: Leaving)
2021-09-25 02:40:07 +0200acidjnk(~acidjnk@p200300d0c703cb77bd57d6e6b991bf0a.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
2021-09-25 02:41:03 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2021-09-25 02:44:13 +0200lbseale(~lbseale@user/ep1ctetus) (Read error: Connection reset by peer)
2021-09-25 02:47:52 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 265 seconds)
2021-09-25 02:49:45 +0200sneedsfeed(~sneedsfee@rrcs-173-95-122-169.midsouth.biz.rr.com)
2021-09-25 02:49:47 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-09-25 02:50:19 +0200jespada(~jespada@2803:9800:9842:7a62:2546:af34:8714:120f) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-09-25 02:52:47 +0200ub(~Thunderbi@178.165.202.105.wireless.dyn.drei.com)
2021-09-25 02:53:16 +0200ubert(~Thunderbi@91.141.79.118.wireless.dyn.drei.com) (Ping timeout: 252 seconds)
2021-09-25 02:53:16 +0200ububert
2021-09-25 02:53:43 +0200 <sneedsfeed> I just made a program thats a lot more involved than anything I've done before. If anyone feels up for it, I would welcome anyone who wants to look at it and give advise/critique. I have made it as good as I know how by this point. https://paste.tomsmeding.com/NedjJZ4x
2021-09-25 02:54:00 +0200 <sneedsfeed> it solves mazes by the way
2021-09-25 02:55:03 +0200 <c_wraith> why did you create those type aliases?
2021-09-25 02:55:34 +0200 <sneedsfeed> for clarity. almost like comments. I thought it was better than commenting.
2021-09-25 02:55:56 +0200 <sneedsfeed> the types of the functions communicate really well what the functions do I think with those named aliases
2021-09-25 02:56:27 +0200 <c_wraith> I really don't like type aliases for simple types. They don't make bugs harder - they just make you have to keep more in your head.
2021-09-25 02:56:40 +0200 <sneedsfeed> hm okay
2021-09-25 02:56:56 +0200 <c_wraith> Not saying they're wrong.
2021-09-25 02:57:07 +0200 <c_wraith> Just... they do less than you hope.
2021-09-25 02:57:32 +0200 <sneedsfeed> kk
2021-09-25 02:58:11 +0200 <c_wraith> I don't like using (==) in the definition of turn, because you're matching against nullary constructors of a known type.
2021-09-25 02:58:28 +0200 <c_wraith> But I see why you did it - it let you put each direction on one line
2021-09-25 02:58:32 +0200 <sneedsfeed> yea i didnt really like that either
2021-09-25 02:58:38 +0200 <sneedsfeed> but yea thats why i did it
2021-09-25 02:58:45 +0200 <sneedsfeed> think its better to just have it 8 lines?
2021-09-25 02:58:51 +0200 <c_wraith> I think I'd write something like: fromTurn :: a -> a -> Turn -> a
2021-09-25 02:59:08 +0200 <c_wraith> And then use it for each direction
2021-09-25 03:01:27 +0200ph88(~ph88@2a02:8109:9e00:7e5c:7cb7:e630:89c:9583) (Ping timeout: 240 seconds)
2021-09-25 03:02:18 +0200 <c_wraith> in testmove, the first four cases match the same pattern - you only need to repeat the guard. Hmm, actually, I don't see why you're using a list for your position type, unless you intend to extend it to n dimensions
2021-09-25 03:03:22 +0200 <c_wraith> Hmm. Looks like you're using a depth-first search. I guess that does work in n dimensions, though your Maze representation doesn't
2021-09-25 03:03:52 +0200 <sneedsfeed> no it is never intended to be multidimensional
2021-09-25 03:04:06 +0200 <c_wraith> Then I'd recommend using (Int, Int) for position instead of [Int]
2021-09-25 03:04:19 +0200 <c_wraith> then you never need to worry about accidentally passing the wrong number of things
2021-09-25 03:04:39 +0200 <sneedsfeed> tuples can hold as many things as a list no?
2021-09-25 03:04:55 +0200 <c_wraith> Well, they're just entirely different. It's not like python.
2021-09-25 03:05:18 +0200 <c_wraith> Tuples are fixed-length. Tuples of different length are different types. Each position can have a different type.
2021-09-25 03:05:30 +0200 <sneedsfeed> just better in general for something that you intend to be of fixed short length.
2021-09-25 03:05:35 +0200 <sneedsfeed> (y)
2021-09-25 03:06:35 +0200 <c_wraith> Huh. Looking at that algorithm - that's... not ideal. You're going to spend a *lot* of time exploring already-rejected paths. That's not Haskell style criticism, though. :)
2021-09-25 03:06:54 +0200 <sneedsfeed> Oh man I know. I tried so hard to do that a different way.
2021-09-25 03:07:15 +0200 <sneedsfeed> I wanted to make it so that if I ended up on the starting position that was a fail, but that didnt work.
2021-09-25 03:07:29 +0200 <sneedsfeed> theres an edge case
2021-09-25 03:07:56 +0200 <c_wraith> I think the most obvious fix is to keep track of everywhere you've checked already.
2021-09-25 03:08:12 +0200 <c_wraith> Never return to a square you've visited before.
2021-09-25 03:08:20 +0200 <sneedsfeed> that wont work
2021-09-25 03:08:37 +0200 <c_wraith> It does as long as you keep your path queue separate from your seen queue
2021-09-25 03:08:39 +0200 <sneedsfeed> imagine a situation where there is a path then a room and you have to go back along that path but there is still an exit
2021-09-25 03:09:29 +0200 <c_wraith> You'd go back up the stack to find where you could have branched the other direction instead of going into the dead end
2021-09-25 03:09:46 +0200machinedgod(~machinedg@24.105.81.50) (Ping timeout: 252 seconds)
2021-09-25 03:09:50 +0200 <sneedsfeed> until there is no other path
2021-09-25 03:10:38 +0200 <c_wraith> Ideally you'd use a shortest-path algorithm, but that's more work. Breadth-first search would get you there. Something like A* could get you there with less fumbling around.
2021-09-25 03:11:02 +0200 <sneedsfeed> yea to be honest this challenged my skills
2021-09-25 03:11:18 +0200 <sneedsfeed> I was happy to get here, but I wouldnt mind going back and doing it better.
2021-09-25 03:11:20 +0200 <c_wraith> in Haskell or just search knowledge?
2021-09-25 03:11:31 +0200 <sneedsfeed> both
2021-09-25 03:12:11 +0200machinedgod(~machinedg@24.105.81.50)
2021-09-25 03:12:11 +0200 <c_wraith> Well - my biggest feedback is to change the position type. Making it a pair instead of a list is just a huge improvement.
2021-09-25 03:12:23 +0200 <sneedsfeed> if you wanted to implement it like that, would you just keep a stack in the form of a list, and pop elements off the top as you have to go back?
2021-09-25 03:12:36 +0200 <c_wraith> yes, that's one approach
2021-09-25 03:12:44 +0200 <sneedsfeed> feels not so efficient
2021-09-25 03:12:54 +0200 <c_wraith> [] is actually a fine stack type
2021-09-25 03:13:15 +0200 <c_wraith> But that inherently implies a depth-first search, which doesn't guarantee you an efficient route.
2021-09-25 03:13:34 +0200 <sneedsfeed> sure sure im just talking about a follow the left wall rule
2021-09-25 03:15:31 +0200 <c_wraith> oh. that is what you're doing. That's not so bad, as long as the start and exit are on outer walls.
2021-09-25 03:15:48 +0200 <sneedsfeed> yes, this was for a challenge project on codewars
2021-09-25 03:15:55 +0200 <sneedsfeed> the exit is always at bottom right
2021-09-25 03:15:56 +0200 <c_wraith> looks like you guarantee the start and end locations are on outer walls
2021-09-25 03:17:53 +0200 <sneedsfeed> this definitely has me interested in trying to make better maze solving algorithms though. it was a fun and interesting project with a lot of room for improvement.
2021-09-25 03:18:20 +0200 <c_wraith> Do you have any experience with computer science education?
2021-09-25 03:18:57 +0200 <sneedsfeed> no i'm completely self taught
2021-09-25 03:19:09 +0200 <sneedsfeed> I have a couple of books.
2021-09-25 03:19:41 +0200 <c_wraith> Maze solving is a form of graph search problem.
2021-09-25 03:19:46 +0200 <geekosaur> that sounds familiar
2021-09-25 03:20:12 +0200 <c_wraith> If you're curious, look into things like "breadth-first search" as a starting point
2021-09-25 03:20:44 +0200 <sneedsfeed> okay I'll check it out
2021-09-25 03:23:41 +0200neurocyte01323(~neurocyte@185.117.68.47)
2021-09-25 03:23:41 +0200neurocyte01323(~neurocyte@185.117.68.47) (Changing host)
2021-09-25 03:23:41 +0200neurocyte01323(~neurocyte@user/neurocyte)
2021-09-25 03:24:11 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
2021-09-25 03:25:46 +0200neurocyte0132(~neurocyte@user/neurocyte) (Ping timeout: 252 seconds)
2021-09-25 03:25:46 +0200neurocyte01323neurocyte0132
2021-09-25 03:31:26 +0200emf(~emf@2620:10d:c090:400::5:38ea) (Quit: emf)
2021-09-25 03:41:06 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:49b6:f37c:5898:ff80) (Remote host closed the connection)
2021-09-25 03:43:16 +0200yauhsien(~yauhsien@61-231-35-247.dynamic-ip.hinet.net)
2021-09-25 03:45:34 +0200alx741(~alx741@181.196.68.94) (Quit: alx741)
2021-09-25 03:46:31 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:49b6:f37c:5898:ff80)
2021-09-25 03:47:13 +0200xff0x(~xff0x@2001:1a81:5287:3100:448c:6d89:40d5:fb1d) (Ping timeout: 252 seconds)
2021-09-25 03:48:17 +0200yauhsien(~yauhsien@61-231-35-247.dynamic-ip.hinet.net) (Ping timeout: 265 seconds)
2021-09-25 03:48:45 +0200xff0x(~xff0x@2001:1a81:52a2:cc00:4234:2859:27a7:60ed)
2021-09-25 03:56:42 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:49b6:f37c:5898:ff80) (Remote host closed the connection)
2021-09-25 04:00:14 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:49b6:f37c:5898:ff80)
2021-09-25 04:00:23 +0200shapr(~user@pool-100-36-247-68.washdc.fios.verizon.net)
2021-09-25 04:01:00 +0200shapr(~user@pool-100-36-247-68.washdc.fios.verizon.net) (Remote host closed the connection)
2021-09-25 04:03:58 +0200korvos(uid486420@id-486420.tinside.irccloud.com)
2021-09-25 04:07:38 +0200hyiltiz(~quassel@31.220.5.250)
2021-09-25 04:12:27 +0200td_(~td@94.134.91.253) (Ping timeout: 265 seconds)
2021-09-25 04:12:38 +0200yinghua_(~yinghua@2800:2121:1400:1db:c0c5:a435:cabe:dd29) (Quit: Leaving)
2021-09-25 04:14:15 +0200td_(~td@muedsl-82-207-238-146.citykom.de)
2021-09-25 04:17:26 +0200Skyfire(~pyon@user/pyon) (Quit: brb)
2021-09-25 04:20:33 +0200harveypwca(~harveypwc@2601:246:c180:a570:2435:ba7:e573:bc26)
2021-09-25 04:34:26 +0200 <TDANG_> I tried to learn Monad but it is still very tough to me.
2021-09-25 04:35:06 +0200 <TDANG_> Any idea where I can get started and unsderstand it well.
2021-09-25 04:35:09 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2021-09-25 04:36:18 +0200 <dsal> TDANG_: What did you try? What is your goal?
2021-09-25 04:36:44 +0200 <TDANG_> I learned from http://book.realworldhaskell.org/
2021-09-25 04:37:18 +0200 <TDANG_> my goal is to understand Monad so that I can understand syntax of Plutus smartcontract
2021-09-25 04:37:39 +0200 <dsal> That looks like a really hard way to learn monads. heh.
2021-09-25 04:38:09 +0200 <dsal> :t (>>=)
2021-09-25 04:38:10 +0200 <lambdabot> Monad m => m a -> (a -> m b) -> m b
2021-09-25 04:38:29 +0200 <dsal> Monad isn't much more than that.
2021-09-25 04:38:47 +0200 <dsal> But starting from there and trying to work out isn't the easiest way to understand anything.
2021-09-25 04:39:06 +0200 <dsal> If there's just a syntax you want to understand, then one can typically *use* monads without having a super deep understanding.
2021-09-25 04:39:34 +0200 <TDANG_> Ok. Just understand to use
2021-09-25 04:39:48 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:49b6:f37c:5898:ff80) (Remote host closed the connection)
2021-09-25 04:40:04 +0200 <TDANG_> can you give some hint of how to interpret the meaning (or usage) or Monad
2021-09-25 04:40:08 +0200 <dsal> It's pretty hard to explain things to people without a good understanding of what they already know.
2021-09-25 04:40:39 +0200 <TDANG_> ;-)
2021-09-25 04:40:41 +0200 <TDANG_> \
2021-09-25 04:41:37 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 252 seconds)
2021-09-25 04:41:50 +0200 <dsal> Can you understand the bind definition above?
2021-09-25 04:42:01 +0200 <TDANG_> yes I can
2021-09-25 04:42:49 +0200 <dsal> OK. That's pretty much all there is to a monad. If you're using `do` syntax, it just does the binding for you in a way that's slightly convenient in some cases.
2021-09-25 04:43:04 +0200 <dsal> @undo do { a <- f; ga }
2021-09-25 04:43:04 +0200 <lambdabot> f >>= \ a -> ga
2021-09-25 04:43:30 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2021-09-25 04:43:39 +0200 <dsal> There was supposed to be a space there. heh.
2021-09-25 04:44:12 +0200 <TDANG_> Oh, I've never seen ; operator
2021-09-25 04:44:52 +0200 <dsal> You wouldn't see it too much in the wild. You can read it as a newline.
2021-09-25 04:45:07 +0200 <dsal> and {} are pretty uncommon as well, unless you want to shove things on a single line.
2021-09-25 04:45:26 +0200 <TDANG_> oh, I got it
2021-09-25 04:45:29 +0200 <dsal> @undo { a <- f ; print a ; g a }
2021-09-25 04:45:29 +0200 <lambdabot> <unknown>.hs:1:1:Parse error: {
2021-09-25 04:45:34 +0200 <dsal> @undo do { a <- f ; print a ; g a }
2021-09-25 04:45:34 +0200 <lambdabot> f >>= \ a -> print a >> g a
2021-09-25 04:46:37 +0200 <dsal> You don't need to have a deep understanding of category theory to put that into use.
2021-09-25 04:46:54 +0200 <TDANG_> a ha
2021-09-25 04:47:21 +0200 <dsal> Do you have an example of something you find hard to understand?
2021-09-25 04:47:37 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:49b6:f37c:5898:ff80)
2021-09-25 04:48:40 +0200zebrag(~chris@user/zebrag) (Remote host closed the connection)
2021-09-25 04:49:10 +0200 <TDANG_> Ok. I think I need invest more time reading + learning
2021-09-25 04:50:11 +0200hololeap(~hololeap@user/hololeap) (Remote host closed the connection)
2021-09-25 04:50:42 +0200 <sneedsfeed> this video kinda made sense to me https://www.youtube.com/watch?v=Nq-q2USYetQ even though i'm new to this stuff too
2021-09-25 04:50:46 +0200 <sneedsfeed> might help
2021-09-25 04:51:27 +0200 <TDANG_> great. thanks
2021-09-25 04:51:31 +0200hololeap(~hololeap@user/hololeap)
2021-09-25 04:54:50 +0200waleee(~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 260 seconds)
2021-09-25 05:00:02 +0200haasn(~nand@haasn.dev) (Quit: ZNC 1.7.5+deb4 - https://znc.in)
2021-09-25 05:01:26 +0200haasn(~nand@haasn.dev)
2021-09-25 05:11:33 +0200xiongxin(~quassel@119.123.100.167)
2021-09-25 05:20:39 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-09-25 05:25:07 +0200doyougnu(~user@c-73-25-202-122.hsd1.or.comcast.net) (Ping timeout: 252 seconds)
2021-09-25 05:38:19 +0200lavaman(~lavaman@98.38.249.169) (Remote host closed the connection)
2021-09-25 05:49:11 +0200yauhsien(~yauhsien@61-231-35-247.dynamic-ip.hinet.net)
2021-09-25 05:51:46 +0200shapr(~user@pool-100-36-247-68.washdc.fios.verizon.net)
2021-09-25 05:54:53 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
2021-09-25 05:56:40 +0200 <hololeap> that Brian Beckman video, Don't Fear the Monad, is actually pretty helpful
2021-09-25 05:57:15 +0200 <hololeap> TDANG_: ^
2021-09-25 05:59:05 +0200 <TDANG_> ;-)
2021-09-25 06:00:50 +0200yauhsien_(~yauhsien@61-231-35-247.dynamic-ip.hinet.net)
2021-09-25 06:00:50 +0200yauhsien(~yauhsien@61-231-35-247.dynamic-ip.hinet.net) (Read error: Connection reset by peer)
2021-09-25 06:04:22 +0200xff0x(~xff0x@2001:1a81:52a2:cc00:4234:2859:27a7:60ed) (Ping timeout: 260 seconds)
2021-09-25 06:04:58 +0200xff0x(~xff0x@2001:1a81:52a2:cc00:afd6:85eb:5a44:1d7e)
2021-09-25 06:08:31 +0200xiongxin(~quassel@119.123.100.167) (Ping timeout: 252 seconds)
2021-09-25 06:09:13 +0200xiongxin(~quassel@113.116.32.113)
2021-09-25 06:14:33 +0200Cajun(~Cajun@user/cajun)
2021-09-25 06:19:59 +0200 <mrianbloom> What is the best library to use to serialize a bytestring into an array of floats? Data.Binary? I'm looking for a fast way to load a (very large) accelerate array.
2021-09-25 06:25:22 +0200agoraphobic_(~agoraphob@ip11-173.bon.riksnet.se)
2021-09-25 06:25:22 +0200agoraphobic(~agoraphob@ip11-173.bon.riksnet.se) (Read error: Connection reset by peer)
2021-09-25 06:27:28 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2021-09-25 06:28:37 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2021-09-25 06:40:04 +0200 <hololeap> mrianbloom: I think that depends on how the floats are encoded
2021-09-25 06:42:33 +0200 <mrianbloom> hololeap I'm actually encoding and decoding them but there is another python program that needs to import them into a numpy array.
2021-09-25 06:43:03 +0200 <hololeap> possibly something like conduit (or pipes) would help if you need to chunk up the bytestring and process it as it's read
2021-09-25 06:44:29 +0200 <mrianbloom> I see, currently I'm trying to write the bytestring into an Vector.Storable and then just pass the pointer into the accelerate array with Data.Array.Accelerate.IO.Foreign.Ptr
2021-09-25 06:44:49 +0200 <mrianbloom> Just seems a little wonky to write this code myself.
2021-09-25 06:45:19 +0200 <mrianbloom> I'm using Data.Binary to parse the Bytestring
2021-09-25 06:49:20 +0200yauhsien_(~yauhsien@61-231-35-247.dynamic-ip.hinet.net) (Ping timeout: 252 seconds)
2021-09-25 06:51:36 +0200_xor(~xor@74.215.232.67) (Quit: brb)
2021-09-25 06:52:00 +0200 <hololeap> mrianbloom: try using Data.Binary.Get to create a (Get (Vector Float)) and then apply it to a your (lazy) bytestring
2021-09-25 06:53:20 +0200 <hololeap> using runGet
2021-09-25 06:54:04 +0200yauhsien(~yauhsien@61-231-35-247.dynamic-ip.hinet.net)
2021-09-25 06:56:03 +0200_xor(~xor@74.215.232.67)
2021-09-25 07:00:51 +0200 <mrianbloom> hololeap, that's what I'm almost doing.
2021-09-25 07:00:59 +0200 <mrianbloom> Here's my current code https://gist.github.com/ianmbloom/fb8e81f23af7db578bbc515460c7933b
2021-09-25 07:01:59 +0200geekosaur(~geekosaur@xmonad/geekosaur) (Ping timeout: 252 seconds)
2021-09-25 07:02:08 +0200 <mrianbloom> Basically they provide me with a (huge) csv file (13000,2500,3) and in order to speed things up on the next run I first store it as binary and then I need to hold it in ram.
2021-09-25 07:02:41 +0200 <hololeap> mrianbloom: why Data.ByteString.Lazy.Char8 ?
2021-09-25 07:03:05 +0200emf(~emf@2620:10d:c090:400::5:f81e)
2021-09-25 07:03:08 +0200 <hololeap> the Char8 is kind of a hack to get ASCII from a bytestring
2021-09-25 07:03:51 +0200 <mrianbloom> Hmmm... I could try swapping in another bytestring.
2021-09-25 07:04:15 +0200 <hololeap> Just use Data.ByteString.Lazy
2021-09-25 07:04:38 +0200 <hololeap> unless you plan to convert each byte to a Char
2021-09-25 07:04:55 +0200emf(~emf@2620:10d:c090:400::5:f81e) (Client Quit)
2021-09-25 07:05:13 +0200korvos(uid486420@id-486420.tinside.irccloud.com) (Quit: Connection closed for inactivity)
2021-09-25 07:05:20 +0200 <mrianbloom> I see, Char8 implements the 'lines' function which I'm using to parse the csv
2021-09-25 07:05:25 +0200slowButPresent(~slowButPr@user/slowbutpresent) (Quit: leaving)
2021-09-25 07:05:54 +0200 <mrianbloom> It's double duty obviously, but if I can use the same library for both tasks I'd like to for now.
2021-09-25 07:06:48 +0200 <hololeap> oh
2021-09-25 07:07:31 +0200 <mrianbloom> I guess I can use both I'll just put a different qualifier on it.
2021-09-25 07:07:46 +0200 <hololeap> you should probably use attoparsec
2021-09-25 07:08:08 +0200 <hololeap> I thought it was in binary format
2021-09-25 07:08:30 +0200 <mrianbloom> I'm doing both
2021-09-25 07:08:59 +0200 <hololeap> you can build up a (Vector Flaot) with attoparsec
2021-09-25 07:08:59 +0200 <mrianbloom> Basically I load the csv into a binary file if its the first run
2021-09-25 07:09:09 +0200 <hololeap> *Float
2021-09-25 07:09:30 +0200 <mrianbloom> I'll look into that.
2021-09-25 07:09:46 +0200 <hololeap> is it too big to hold the entire vector in ram?
2021-09-25 07:10:22 +0200yauhsien(~yauhsien@61-231-35-247.dynamic-ip.hinet.net) (Remote host closed the connection)
2021-09-25 07:10:28 +0200 <mrianbloom> No, so, loading the csv is very slow because it's very large
2021-09-25 07:10:46 +0200 <hololeap> do you need to consume the vector as it is built, or do you want to build it and store it in ram
2021-09-25 07:10:59 +0200 <mrianbloom> I'm actually loading it into ram so that I can encode slices into files that get sent to python scripts
2021-09-25 07:11:50 +0200 <mrianbloom> I need to construct a vector hold it in ram and write it to files as well (I write both the whole array as well as slices.)
2021-09-25 07:12:19 +0200 <hololeap> well, just make an attoparsec parser which reads the CSV into the data type you want. you can append to the vector using its Monoid instance, which should simplify things
2021-09-25 07:15:33 +0200 <mrianbloom> I'll try appending a vector. That might work well thanks.
2021-09-25 07:16:00 +0200yauhsien(~yauhsien@61-231-35-247.dynamic-ip.hinet.net)
2021-09-25 07:20:09 +0200mei(~mei@user/mei)
2021-09-25 07:20:41 +0200yauhsien(~yauhsien@61-231-35-247.dynamic-ip.hinet.net) (Ping timeout: 252 seconds)
2021-09-25 07:21:07 +0200arpl(~arpl@84-107-171-239.cable.dynamic.v4.ziggo.nl)
2021-09-25 07:23:50 +0200 <hololeap> mrianbloom: are those numbers always integers or could you get something with a decimal in the CSV file?
2021-09-25 07:26:45 +0200machinedgod(~machinedg@24.105.81.50) (Ping timeout: 265 seconds)
2021-09-25 07:31:49 +0200img(~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
2021-09-25 07:32:06 +0200img(~img@user/img)
2021-09-25 07:35:52 +0200yauhsien(~yauhsien@61-231-35-247.dynamic-ip.hinet.net)
2021-09-25 07:38:17 +0200arpl(~arpl@84-107-171-239.cable.dynamic.v4.ziggo.nl) ()
2021-09-25 07:40:22 +0200yauhsien(~yauhsien@61-231-35-247.dynamic-ip.hinet.net) (Ping timeout: 252 seconds)
2021-09-25 07:41:15 +0200jinsun(~quassel@user/jinsun) (Ping timeout: 265 seconds)
2021-09-25 07:43:30 +0200jinsun(~quassel@user/jinsun)
2021-09-25 07:43:54 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:49b6:f37c:5898:ff80) (Remote host closed the connection)
2021-09-25 07:47:04 +0200 <hololeap> mrianbloom: maybe this would work for you: http://sprunge.us/aMJ35R
2021-09-25 07:48:12 +0200 <hololeap> http://sprunge.us/7nux2t -- with the imports cleaned up
2021-09-25 07:49:17 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 252 seconds)
2021-09-25 07:51:15 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-09-25 08:05:48 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-09-25 08:05:48 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
2021-09-25 08:05:48 +0200wroathe(~wroathe@user/wroathe)
2021-09-25 08:10:44 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 265 seconds)
2021-09-25 08:15:34 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer)
2021-09-25 08:15:57 +0200zmt01(~zmt00@user/zmt00) (Ping timeout: 250 seconds)
2021-09-25 08:20:13 +0200MQ-17J(~MQ-17J@8.6.144.233)
2021-09-25 08:21:38 +0200mei(~mei@user/mei) (Quit: mei)
2021-09-25 08:25:43 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
2021-09-25 08:26:06 +0200takuan(~takuan@178-116-218-225.access.telenet.be)
2021-09-25 08:27:52 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2021-09-25 08:29:02 +0200hammock(~Hammock@2600:1700:19a1:3330::588) (Ping timeout: 260 seconds)
2021-09-25 08:31:22 +0200 <hololeap> http://sprunge.us/W3ghSa -- mrianbloom: this uses lazy bytestrings and can handle file endings a little better
2021-09-25 08:31:56 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2021-09-25 08:34:23 +0200chomwitt(~chomwitt@2a02:587:dc0a:5800:12c3:7bff:fe6d:d374)
2021-09-25 08:36:54 +0200ksqsf(~user@2001:da8:d800:189:1d6f:35b0:8e7:c962)
2021-09-25 08:41:11 +0200aaaaaaaaaaaaaaaa(~aaaaaaaaa@byc46.neoplus.adsl.tpnet.pl)
2021-09-25 08:43:42 +0200tromp(~textual@dhcp-077-249-230-040.chello.nl)
2021-09-25 08:44:17 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:49b6:f37c:5898:ff80)
2021-09-25 08:48:38 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:49b6:f37c:5898:ff80) (Ping timeout: 260 seconds)
2021-09-25 08:49:18 +0200hololeap(~hololeap@user/hololeap) (Ping timeout: 276 seconds)
2021-09-25 08:51:54 +0200xiongxin(~quassel@113.116.32.113) (Ping timeout: 260 seconds)
2021-09-25 08:52:19 +0200xiongxin(~quassel@119.123.102.171)
2021-09-25 08:54:19 +0200 <tomsmeding> mrianbloom: I've found the bytestring-lexing package to be reasonably fast at parsing float values from bytestrings -- many times faster than plain Read, but you're already doing something different than that
2021-09-25 08:54:52 +0200 <tomsmeding> that remark is useful depending on what your bottleneck is :)
2021-09-25 08:56:03 +0200aaaaaaaaaaaaaaaa(~aaaaaaaaa@byc46.neoplus.adsl.tpnet.pl) (Ping timeout: 256 seconds)
2021-09-25 08:56:37 +0200fendor(~fendor@178.165.207.87.wireless.dyn.drei.com)
2021-09-25 09:02:43 +0200hololeap(~hololeap@user/hololeap)
2021-09-25 09:03:39 +0200Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2021-09-25 09:04:20 +0200neurocyte01322(~neurocyte@212.232.84.248)
2021-09-25 09:04:20 +0200neurocyte01322(~neurocyte@212.232.84.248) (Changing host)
2021-09-25 09:04:20 +0200neurocyte01322(~neurocyte@user/neurocyte)
2021-09-25 09:06:50 +0200neurocyte0132(~neurocyte@user/neurocyte) (Ping timeout: 252 seconds)
2021-09-25 09:06:51 +0200neurocyte01322neurocyte0132
2021-09-25 09:07:01 +0200Sgeo(~Sgeo@user/sgeo)
2021-09-25 09:07:02 +0200max22-(~maxime@2a01cb088335980064e1e8ac26e1f95e.ipv6.abo.wanadoo.fr)
2021-09-25 09:07:14 +0200yauhsien(~yauhsien@61-231-35-247.dynamic-ip.hinet.net)
2021-09-25 09:07:24 +0200alzgh(~alzgh@user/alzgh)
2021-09-25 09:08:26 +0200hololeap(~hololeap@user/hololeap) (Remote host closed the connection)
2021-09-25 09:10:33 +0200hololeap(~hololeap@user/hololeap)
2021-09-25 09:11:14 +0200python476(~user@88.160.31.174) (Ping timeout: 252 seconds)
2021-09-25 09:11:47 +0200yauhsien(~yauhsien@61-231-35-247.dynamic-ip.hinet.net) (Ping timeout: 252 seconds)
2021-09-25 09:22:41 +0200hololeap(~hololeap@user/hololeap) (Remote host closed the connection)
2021-09-25 09:24:26 +0200bontaq(~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 252 seconds)
2021-09-25 09:29:07 +0200ksqsf`(~user@2001:da8:d800:189:4d9b:cfa5:8d1d:283)
2021-09-25 09:29:41 +0200wonko(~wjc@62.115.229.50)
2021-09-25 09:30:58 +0200ksqsf(~user@2001:da8:d800:189:1d6f:35b0:8e7:c962) (Ping timeout: 252 seconds)
2021-09-25 09:31:51 +0200hololeap(~hololeap@user/hololeap)
2021-09-25 09:37:44 +0200xiongxin(~quassel@119.123.102.171) (Ping timeout: 265 seconds)
2021-09-25 09:37:51 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2021-09-25 09:45:17 +0200tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
2021-09-25 09:45:58 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:49b6:f37c:5898:ff80)
2021-09-25 09:46:05 +0200oxide(~lambda@user/oxide)
2021-09-25 09:46:08 +0200hnOsmium0001(uid453710@id-453710.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
2021-09-25 09:49:36 +0200vysn(~vysn@user/vysn)
2021-09-25 09:50:42 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:49b6:f37c:5898:ff80) (Ping timeout: 260 seconds)
2021-09-25 09:52:32 +0200waleee(~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd)
2021-09-25 09:59:36 +0200acidjnk(~acidjnk@p200300d0c703cb72bd57d6e6b991bf0a.dip0.t-ipconnect.de)
2021-09-25 10:06:39 +0200_ht(~quassel@82-169-194-8.biz.kpn.net)
2021-09-25 10:11:56 +0200hololeap(~hololeap@user/hololeap) (Remote host closed the connection)
2021-09-25 10:12:11 +0200nfd(~nfd@user/nfd)
2021-09-25 10:13:21 +0200xiongxin(~quassel@113.116.32.113)
2021-09-25 10:15:55 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:15c6:decf:bd32:9e19)
2021-09-25 10:16:04 +0200qwedfg(~qwedfg@user/qwedfg) (Ping timeout: 252 seconds)
2021-09-25 10:18:16 +0200eggplant_(~Eggplanta@2600:1700:bef1:5e10:2882:621e:ea09:67b5)
2021-09-25 10:18:51 +0200Pickchea(~private@user/pickchea)
2021-09-25 10:19:18 +0200ksqsf``(~user@2001:da8:d800:189:91e6:fa37:d466:604b)
2021-09-25 10:20:34 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:15c6:decf:bd32:9e19) (Ping timeout: 260 seconds)
2021-09-25 10:21:01 +0200ksqsf`(~user@2001:da8:d800:189:4d9b:cfa5:8d1d:283) (Ping timeout: 252 seconds)
2021-09-25 10:21:39 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-09-25 10:21:44 +0200kuribas(~user@ptr-25vy0ia6bff50uvref3.18120a2.ip6.access.telenet.be)
2021-09-25 10:22:54 +0200eggplant_(~Eggplanta@2600:1700:bef1:5e10:2882:621e:ea09:67b5) (Ping timeout: 260 seconds)
2021-09-25 10:27:34 +0200xff0x(~xff0x@2001:1a81:52a2:cc00:afd6:85eb:5a44:1d7e) (Ping timeout: 260 seconds)
2021-09-25 10:27:54 +0200ksqsf```(~user@2001:da8:d800:189:98a2:a71a:35ff:a8dd)
2021-09-25 10:28:07 +0200xff0x(~xff0x@2001:1a81:52a2:cc00:e5a6:b6dd:762:ffad)
2021-09-25 10:28:30 +0200waleee(~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 260 seconds)
2021-09-25 10:29:49 +0200ksqsf``(~user@2001:da8:d800:189:91e6:fa37:d466:604b) (Ping timeout: 252 seconds)
2021-09-25 10:37:13 +0200Tuplanolla(~Tuplanoll@91-159-69-50.elisa-laajakaista.fi)
2021-09-25 10:39:45 +0200nrl^(~nrl@12.203.127.82) (Remote host closed the connection)
2021-09-25 10:43:08 +0200qwedfg(~qwedfg@user/qwedfg)
2021-09-25 10:52:22 +0200Brumaire(~quassel@81-64-14-121.rev.numericable.fr)
2021-09-25 10:55:21 +0200econo(uid147250@user/econo) (Quit: Connection closed for inactivity)
2021-09-25 10:56:10 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
2021-09-25 11:00:03 +0200masaeedu[m](~masaeedum@2001:470:69fc:105::e256) (Quit: You have been kicked for being idle)
2021-09-25 11:01:47 +0200Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2021-09-25 11:07:27 +0200Skyfire(~pyon@user/pyon)
2021-09-25 11:08:42 +0200yauhsien(~yauhsien@61-231-35-247.dynamic-ip.hinet.net)
2021-09-25 11:10:21 +0200mousey(~sky@gateway/tor-sasl/mousey) (Ping timeout: 276 seconds)
2021-09-25 11:11:37 +0200ksqsf```(~user@2001:da8:d800:189:98a2:a71a:35ff:a8dd) (Ping timeout: 252 seconds)
2021-09-25 11:13:13 +0200yauhsien(~yauhsien@61-231-35-247.dynamic-ip.hinet.net) (Ping timeout: 252 seconds)
2021-09-25 11:20:12 +0200acidjnk_new(~acidjnk@p200300d0c703cb723ce418ea93e3eeac.dip0.t-ipconnect.de)
2021-09-25 11:23:43 +0200acidjnk(~acidjnk@p200300d0c703cb72bd57d6e6b991bf0a.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
2021-09-25 11:24:46 +0200python476(~user@88.160.31.174)
2021-09-25 11:38:34 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 265 seconds)
2021-09-25 11:38:58 +0200xiongxin(~quassel@113.116.32.113) (Ping timeout: 260 seconds)
2021-09-25 11:40:01 +0200xiongxin(~quassel@113.116.34.58)
2021-09-25 11:46:15 +0200wonko(~wjc@62.115.229.50) (Quit: See You Space Cowboy..)
2021-09-25 11:47:22 +0200werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 252 seconds)
2021-09-25 11:58:29 +0200python47`(~user@88.160.31.174)
2021-09-25 12:00:19 +0200python476(~user@88.160.31.174) (Ping timeout: 265 seconds)
2021-09-25 12:00:47 +0200alaspeanutcheese(~alaspeanu@52pc67.sshunet.nl) (Ping timeout: 240 seconds)
2021-09-25 12:02:30 +0200__monty__(~toonn@user/toonn)
2021-09-25 12:04:05 +0200 <Guest372> addOne x f = f x; addTwo x f = do { let r = f x; doSomething; return r }; could we say addOne and addTwo have same type signature?
2021-09-25 12:05:37 +0200 <c_wraith> they don't have the same most-general type
2021-09-25 12:05:46 +0200 <c_wraith> (also known as principle type)
2021-09-25 12:06:27 +0200 <c_wraith> actually, they don't have the same type at all. I think you get an infinite type error if you try to unify those
2021-09-25 12:07:18 +0200 <c_wraith> yeah, you'd be trying to unify the type of (f x) with the type of (return (f x))
2021-09-25 12:07:33 +0200 <c_wraith> those will never unify. infinite type error
2021-09-25 12:11:28 +0200 <tomsmeding> (for the sake of nitpicking: principal type, not principle type :) )
2021-09-25 12:11:47 +0200 <c_wraith> It's the type I feel in my heart!
2021-09-25 12:11:55 +0200 <tomsmeding> :D
2021-09-25 12:12:44 +0200xiongxin(~quassel@113.116.34.58) (Ping timeout: 252 seconds)
2021-09-25 12:12:45 +0200fendor(~fendor@178.165.207.87.wireless.dyn.drei.com) (Remote host closed the connection)
2021-09-25 12:12:54 +0200FragByte(~christian@user/fragbyte) (Quit: Quit)
2021-09-25 12:13:11 +0200xiongxin(~quassel@113.116.32.113)
2021-09-25 12:13:34 +0200 <Guest372> that withFile :: FilePath -> IOMode -> (Handle -> IO r) -> IO r, withFile get (Handle -> IO r) result them close file, return result, what if we creat a withFileCPS that take (Handle -> IO r) in the last, they have the same type right?
2021-09-25 12:14:40 +0200FragByte(~christian@user/fragbyte)
2021-09-25 12:15:03 +0200mc47(~mc47@xmonad/TheMC47)
2021-09-25 12:15:26 +0200 <c_wraith> did you mean r <- f x in your addTwo?
2021-09-25 12:15:44 +0200 <c_wraith> If you did, then you could at least unify the types of those two
2021-09-25 12:16:08 +0200 <tomsmeding> :t \x f -> f x
2021-09-25 12:16:09 +0200 <lambdabot> t1 -> (t1 -> t2) -> t2
2021-09-25 12:16:10 +0200 <Guest372> kimd of
2021-09-25 12:16:22 +0200 <tomsmeding> :t \x f -> do { r <- f x ; undefined ; return r }
2021-09-25 12:16:22 +0200 <lambdabot> Monad m => t -> (t -> m b) -> m b
2021-09-25 12:17:02 +0200 <c_wraith> those unify, though one is clearly more general than the other.
2021-09-25 12:17:05 +0200 <kuribas> Guest372: did you mean addOne x f = pure $ f x?
2021-09-25 12:17:27 +0200 <Guest372> no, just f x
2021-09-25 12:17:35 +0200 <c_wraith> are you the same person who asked about withFile and CPS a few days ago?
2021-09-25 12:17:57 +0200 <Guest372> I asked withFile a few days ago
2021-09-25 12:18:44 +0200 <kuribas> Guest372: well, a -> (a -> b) -> b and Monad m => a -> (a -> b) -> m b are clearly different.
2021-09-25 12:21:51 +0200Pickchea(~private@user/pickchea) (Quit: Leaving)
2021-09-25 12:21:54 +0200xiongxin(~quassel@113.116.32.113) (Ping timeout: 260 seconds)
2021-09-25 12:26:06 +0200tfeb(~tfb@88.98.95.237)
2021-09-25 12:27:15 +0200chris(~chris@81.96.113.213)
2021-09-25 12:27:19 +0200chrisGuest7748
2021-09-25 12:28:26 +0200xff0x(~xff0x@2001:1a81:52a2:cc00:e5a6:b6dd:762:ffad) (Ping timeout: 260 seconds)
2021-09-25 12:29:20 +0200xff0x(~xff0x@2001:1a81:52a2:cc00:e316:3cc6:4da2:e9d8)
2021-09-25 12:30:21 +0200fendor(~fendor@178.165.207.87.wireless.dyn.drei.com)
2021-09-25 12:31:52 +0200Guest7748(~chris@81.96.113.213) (Ping timeout: 252 seconds)
2021-09-25 12:33:16 +0200tfeb(~tfb@88.98.95.237) (Quit: died)
2021-09-25 12:38:45 +0200 <maerwald> too bad you can't use a where-clause function in a viewpattern of the top-level definitoin
2021-09-25 12:40:57 +0200 <tomsmeding> that feels like an unnecessary restriction
2021-09-25 12:43:24 +0200 <maerwald> it's simple sugar I guess
2021-09-25 12:43:44 +0200 <maerwald> not refined carbs
2021-09-25 12:44:49 +0200terrorjack(~terrorjac@ec2-35-181-134-114.eu-west-3.compute.amazonaws.com) (Quit: The Lounge - https://thelounge.chat)
2021-09-25 12:46:12 +0200 <tomsmeding> perhaps they didn't want to deal with the situation where the where-bindings refer to the value being matched with the view pattern?
2021-09-25 12:46:31 +0200 <tomsmeding> f (thing -> x) = ... where thing = .. x ..
2021-09-25 12:46:49 +0200 <tomsmeding> there's no reason it _couldn't_ work I think
2021-09-25 12:47:07 +0200terrorjack(~terrorjac@ec2-35-181-134-114.eu-west-3.compute.amazonaws.com)
2021-09-25 12:51:13 +0200ubert1(~Thunderbi@178.165.202.105.wireless.dyn.drei.com)
2021-09-25 12:52:23 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-09-25 12:53:07 +0200[_](~itchyjunk@user/itchyjunk/x-7353470)
2021-09-25 12:54:33 +0200 <wz1000> what goes wrong if you try to use this function? dne :: ((a -> Void) -> Void) -> a; dne k = absurd $ k (unsafeCoerce id)
2021-09-25 12:55:54 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 265 seconds)
2021-09-25 12:55:56 +0200 <tomsmeding> wz1000: what are you going to call it with?
2021-09-25 12:58:07 +0200evertedsphere(sid434122@id-434122.hampstead.irccloud.com)
2021-09-25 13:00:39 +0200slep(~slep@cpc150002-brnt4-2-0-cust437.4-2.cable.virginm.net) (Quit: slep)
2021-09-25 13:00:57 +0200alx741(~alx741@181.196.68.94)
2021-09-25 13:02:43 +0200slep(~slep@cpc150002-brnt4-2-0-cust437.4-2.cable.virginm.net)
2021-09-25 13:02:49 +0200 <tomsmeding> hm, I guess (\f -> f 42)
2021-09-25 13:03:08 +0200 <kuribas> ($ 42)
2021-09-25 13:03:29 +0200 <tomsmeding> (`id` 42)
2021-09-25 13:04:18 +0200 <kuribas> wz1000: coredump?
2021-09-25 13:04:46 +0200 <kuribas> wz1000: I read "unsafeCoerce" as "coredump unless you know what you do".
2021-09-25 13:05:01 +0200 <wz1000> but this isn't usafeCoerce
2021-09-25 13:05:17 +0200 <evertedsphere> good day
2021-09-25 13:05:25 +0200 <kuribas> wz1000: it uses unsafeCoerce
2021-09-25 13:05:48 +0200evertedsphere(sid434122@id-434122.hampstead.irccloud.com) (Quit: Updating details, brb)
2021-09-25 13:05:59 +0200evertedsphere(sid434122@id-434122.hampstead.irccloud.com)
2021-09-25 13:06:13 +0200 <wz1000> Do you have a program which coredumps using dne?
2021-09-25 13:06:27 +0200 <kuribas> wz1000: sorry, I was just guessing.
2021-09-25 13:06:28 +0200 <evertedsphere> curious: what's dne
2021-09-25 13:06:32 +0200evertedsphere(sid434122@id-434122.hampstead.irccloud.com) ()
2021-09-25 13:06:35 +0200 <kuribas> wz1000: let me try it then :)
2021-09-25 13:07:39 +0200evertedsphere(sid434122@id-434122.hampstead.irccloud.com)
2021-09-25 13:08:02 +0200 <tomsmeding> wz1000: well it's certainly behaving fishy
2021-09-25 13:08:24 +0200 <tomsmeding> 'print (dne ($ "abc"))' gives "abc" for me with -O0 and "abc with -O2
2021-09-25 13:08:45 +0200 <tomsmeding> feels like a coredump is just some experimentation away
2021-09-25 13:10:13 +0200 <kuribas> dne ($ 2) => 2
2021-09-25 13:12:52 +0200 <tomsmeding> the core also looks _very_ fishy: 'print (dne ($ "hoi"))' prints a value 'GHC.Types.: @ Char GHC.Show.$fShow(,)3 Main.main2' (where that $fShow(,)3 is a `"`, presumably), where main2 is an empty case on the string to print unsafe-coerced to Void
2021-09-25 13:12:56 +0200 <amirouche> re full-stack declarative webui, that is basically what hyperfiddle does
2021-09-25 13:12:58 +0200 <amirouche> https://hyperfiddle.notion.site/Reactive-Clojure-You-don-t-need-a-web-framework-you-need-a-web-lan…
2021-09-25 13:13:04 +0200 <Franciman> hi amirouche ^^
2021-09-25 13:13:14 +0200 <tomsmeding> this probably half-works by accident due to the right values being in the right registers by accident
2021-09-25 13:13:23 +0200 <amirouche> ref: https://github.com/hyperfiddle/hyperfiddle
2021-09-25 13:13:33 +0200 <amirouche> Franciman: hey :)
2021-09-25 13:13:47 +0200python47`(~user@88.160.31.174) (Ping timeout: 252 seconds)
2021-09-25 13:14:57 +0200 <tomsmeding> wz1000: and when I try to enlarge the program a bit, ghc just collapses the whole thing down to an empty case on void, and the final executable is a nop :p
2021-09-25 13:15:17 +0200 <tomsmeding> nice try but ghc doesn't like your proof of DNE
2021-09-25 13:15:25 +0200 <wz1000> don't use optimisation
2021-09-25 13:15:28 +0200[_][itchyjunk]
2021-09-25 13:16:45 +0200 <tomsmeding> right, so "what goes wrong if you try to use this function?" -- using optimisation is what goes wrong, perhaps among other things :p
2021-09-25 13:17:40 +0200zaquest(~notzaques@5.128.210.178) (Remote host closed the connection)
2021-09-25 13:18:57 +0200zaquest(~notzaques@5.128.210.178)
2021-09-25 13:19:03 +0200__monty__(~toonn@user/toonn) (Quit: leaving)
2021-09-25 13:19:11 +0200 <tomsmeding> if you want to out-law optimisation, you can pull similar tricks in C as well: int bar() { return 42; } int foo() { bar(); } int main() { printf("%d\n", foo()); }
2021-09-25 13:19:22 +0200 <tomsmeding> that prints 42 without optimisations, but sensibly doesn't with optimisations
2021-09-25 13:19:25 +0200tromp(~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2021-09-25 13:20:22 +0200 <wz1000> what is wrong with that C?
2021-09-25 13:20:30 +0200ulvarrefr(~user@185.24.53.152)
2021-09-25 13:20:46 +0200 <wz1000> oh, is it the missing return?
2021-09-25 13:20:50 +0200 <oak-> foo missing return?
2021-09-25 13:21:10 +0200martin02(~silas@141.84.69.76) (Ping timeout: 260 seconds)
2021-09-25 13:21:19 +0200 <wz1000> I don't see what that has to do with optimisation
2021-09-25 13:22:21 +0200hololeap(~hololeap@user/hololeap)
2021-09-25 13:22:57 +0200xiongxin(~quassel@113.116.34.58)
2021-09-25 13:26:21 +0200dumbsharka(~amirvince@user/amirvincent64) (Ping timeout: 265 seconds)
2021-09-25 13:26:46 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
2021-09-25 13:28:55 +0200martin02(~silas@141.84.69.76)
2021-09-25 13:30:44 +0200bontaq(~user@ool-45779fe5.dyn.optonline.net)
2021-09-25 13:33:56 +0200__monty__(~toonn@user/toonn)
2021-09-25 13:36:06 +0200slowButPresent(~slowButPr@user/slowbutpresent)
2021-09-25 13:36:08 +0200kuribas(~user@ptr-25vy0ia6bff50uvref3.18120a2.ip6.access.telenet.be) (Remote host closed the connection)
2021-09-25 13:43:43 +0200pavonia(~user@user/siracusa) (Quit: Bye!)
2021-09-25 13:44:20 +0200 <tomsmeding> yeah foo missing return
2021-09-25 13:44:52 +0200 <tomsmeding> what that has to do with optimisation is that _without_ optimisation, the call to bar() won't be elided, and because of C calling conventions (at least on x64) it will put the return value in $rax
2021-09-25 13:45:13 +0200 <tomsmeding> so even though foo doesn't return (and hence doesn't write anything in $rax), the value from bar() will still be there, so main will print 42
2021-09-25 13:45:46 +0200 <tomsmeding> _with_ optimisation, the compiler actually makes use of the language semantics as distinct from accidental leakage of machine semantics, and elides the call to bar
2021-09-25 13:46:05 +0200 <tomsmeding> after which printf will print a value from a register that was never initialised, and that will probably not contain 42
2021-09-25 13:46:42 +0200 <tomsmeding> optimisation enforces language semantics, while non-optimisation lets you make use of accidental properties of the translation to machine code, that you can't rely on in larger programs
2021-09-25 13:46:49 +0200 <tomsmeding> same here :p
2021-09-25 13:46:54 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2021-09-25 13:47:29 +0200 <tomsmeding> with respect to Haskell's language semantics you're doing nonsense of course, but some accidental properties of the translation to machine code might make the dne trick work when optimisations don't interfere
2021-09-25 13:47:38 +0200 <wz1000> You can {- NOINLINE dne #-} and disable optimisation in that module so it acts as a primitive
2021-09-25 13:48:31 +0200 <tomsmeding> yeah and that works until the next ghc point release where they made some changes to the machine code translation :p
2021-09-25 13:49:04 +0200 <tomsmeding> it's fun to figure out what's going on, but it's not directly practically useful (but you knew that already)
2021-09-25 13:51:50 +0200Guest68(~Guest68@130.226.132.96)
2021-09-25 13:53:33 +0200Guest68(~Guest68@130.226.132.96) (Client Quit)
2021-09-25 13:58:03 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-09-25 14:01:31 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2021-09-25 14:04:54 +0200korvos(uid486420@id-486420.tinside.irccloud.com)
2021-09-25 14:05:59 +0200eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 265 seconds)
2021-09-25 14:08:08 +0200 <maerwald> HLS stopped working. Only checks some modules and ignores others
2021-09-25 14:08:19 +0200 <tomsmeding> $ haskell-language-server-wrapper
2021-09-25 14:13:43 +0200chris(~chris@81.96.113.213)
2021-09-25 14:13:47 +0200chrisGuest2479
2021-09-25 14:16:50 +0200jespada(~jespada@2803:9800:9842:7a62:4059:ff44:5d67:770d)
2021-09-25 14:18:33 +0200Guest2479(~chris@81.96.113.213) (Ping timeout: 265 seconds)
2021-09-25 14:18:42 +0200tromp(~textual@dhcp-077-249-230-040.chello.nl)
2021-09-25 14:27:12 +0200Guest2517(~Guest25@eth-west-pareq2-46-193-4-100.wb.wifirst.net)
2021-09-25 14:27:19 +0200Guest2517(~Guest25@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Client Quit)
2021-09-25 14:29:15 +0200machinedgod(~machinedg@24.105.81.50)
2021-09-25 14:30:44 +0200ack_inc(~anirudh@122.161.190.207)
2021-09-25 14:33:50 +0200 <maerwald> hmm, how do you highjack the way ghci shows values again?
2021-09-25 14:34:06 +0200 <maerwald> I wanna tweak my doctests so that they use Pretty class for showing
2021-09-25 14:38:05 +0200 <Taneb> I wasn't aware there was such an option!
2021-09-25 14:39:21 +0200 <merijn> Taneb: You can overwrite the logic to render ghci output, yes
2021-09-25 14:39:39 +0200 <merijn> Taneb: There's some snippets around the web for coloured output too
2021-09-25 14:39:58 +0200 <merijn> ghci has surprisingly many sophisticated options almost no one knows about :p
2021-09-25 14:41:02 +0200 <merijn> Here's a pro-tip for becoming a GHC/Haskell wizard using this "one weird trick", regardless of skill level: Make sure to skim the *entire* GHC user guide at least, like, once a year ;)
2021-09-25 14:41:38 +0200 <merijn> Literally every time I find some new trick, re-discover something I forgot, etc.
2021-09-25 14:42:50 +0200 <maerwald> doesn't work in doctests
2021-09-25 14:42:55 +0200 <maerwald> just times out
2021-09-25 14:44:14 +0200FragByte(~christian@user/fragbyte) (Ping timeout: 260 seconds)
2021-09-25 14:44:56 +0200FragByte(~christian@user/fragbyte)
2021-09-25 14:46:15 +0200 <maerwald> seems you can't redefine "show", just "putStrLn"
2021-09-25 14:46:17 +0200 <maerwald> not that useful
2021-09-25 14:47:32 +0200fendor_(~fendor@178.115.43.157.wireless.dyn.drei.com)
2021-09-25 14:47:46 +0200 <tomsmeding> maerwald: the -interactive-print option looks like it should be able to do what you want?
2021-09-25 14:47:55 +0200 <tomsmeding> (just skimmed the manual lol)
2021-09-25 14:48:00 +0200 <maerwald> doesn't seem so
2021-09-25 14:48:23 +0200 <tomsmeding> because doctest does somethingw weird? ah
2021-09-25 14:48:31 +0200 <tomsmeding> oh right, s/putStrLn/print/ in your message
2021-09-25 14:48:41 +0200 <maerwald> I wanna redefine Show
2021-09-25 14:49:07 +0200 <merijn> Why?
2021-09-25 14:49:13 +0200 <merijn> Human readability?
2021-09-25 14:49:21 +0200 <maerwald> doctests as said above
2021-09-25 14:49:32 +0200qbt(~edun@user/edun)
2021-09-25 14:49:55 +0200 <merijn> You are skipping several steps of inference there if you think I understand why that should be an explanation :)
2021-09-25 14:50:02 +0200fendor(~fendor@178.165.207.87.wireless.dyn.drei.com) (Ping timeout: 252 seconds)
2021-09-25 14:50:12 +0200 <maerwald> I'm not too interested in debating the why
2021-09-25 14:50:38 +0200 <merijn> maerwald: Well if the answer is "for readability of humans" I have a solution
2021-09-25 14:50:52 +0200 <merijn> If the answer isn't that, than I dunno, RIP your sanity
2021-09-25 14:51:47 +0200 <merijn> but "for doctests" tells me as much as "for love" about what you need :p
2021-09-25 14:51:48 +0200 <maerwald> it's only partially about readability... it's making writing doctests sane
2021-09-25 14:52:03 +0200 <merijn> @hackage pretty-show
2021-09-25 14:52:03 +0200 <lambdabot> https://hackage.haskell.org/package/pretty-show
2021-09-25 14:52:08 +0200 <merijn> if you need the readability
2021-09-25 14:52:21 +0200 <maerwald> that doesn't solve the problem of me having to put that functoin everywhere
2021-09-25 14:53:08 +0200 <merijn> maerwald: Well it can operate on the String output of Show even if you cannot replace the show call
2021-09-25 14:53:48 +0200 <maerwald> that's not gonna help I think
2021-09-25 14:54:14 +0200 <merijn> Well, then "RIP your sanity" :p
2021-09-25 14:54:28 +0200 <maerwald> I don't know what that means
2021-09-25 14:55:22 +0200 <merijn> maerwald: It means that any solution will probably a frustrating endeavour of obscure ill-documented workarounds that'll make you mad (in both meanings of the word) :p
2021-09-25 14:55:39 +0200 <maerwald> I'm already mad. What are you talking about?
2021-09-25 14:56:02 +0200maerwaldeats part of his foot
2021-09-25 14:56:06 +0200 <maerwald> oh wait, that was rms
2021-09-25 14:58:47 +0200 <maerwald> o O ( somewhat delicious though )
2021-09-25 14:58:58 +0200gehmehgeh(~user@user/gehmehgeh)
2021-09-25 14:59:20 +0200 <maerwald> there could be a TH hack to do this
2021-09-25 14:59:53 +0200 <maerwald> but then again I believe doctest can easily support this
2021-09-25 14:59:56 +0200hyiltiz(~quassel@31.220.5.250) (Ping timeout: 252 seconds)
2021-09-25 14:59:58 +0200sedeki(~textual@user/sedeki)
2021-09-25 15:04:05 +0200hyiltiz(~quassel@31.220.5.250)
2021-09-25 15:06:01 +0200sedeki(~textual@user/sedeki) (Quit: Textual IRC Client: www.textualapp.com)
2021-09-25 15:15:13 +0200hyiltiz(~quassel@31.220.5.250) (Ping timeout: 252 seconds)
2021-09-25 15:17:48 +0200hyiltiz(~quassel@31.220.5.250)
2021-09-25 15:29:05 +0200Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Ping timeout: 252 seconds)
2021-09-25 15:30:09 +0200chris(~chris@81.96.113.213)
2021-09-25 15:30:13 +0200chrisGuest8167
2021-09-25 15:33:31 +0200jespada(~jespada@2803:9800:9842:7a62:4059:ff44:5d67:770d) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-09-25 15:34:35 +0200Guest8167(~chris@81.96.113.213) (Ping timeout: 252 seconds)
2021-09-25 15:35:24 +0200ru0mad(~ru0mad@82-64-17-144.subs.proxad.net)
2021-09-25 15:35:50 +0200jumper149(~jumper149@80.240.31.34)
2021-09-25 15:41:17 +0200Lycurgus(~juan@98.4.112.204)
2021-09-25 15:43:17 +0200asthasr(~asthasr@162.210.28.151) (Quit: asthasr)
2021-09-25 15:47:08 +0200ru0mad(~ru0mad@82-64-17-144.subs.proxad.net) ()
2021-09-25 15:48:49 +0200Guest90(~Guest90@DSL217-132-180-45.bb.netvision.net.il)
2021-09-25 15:53:50 +0200TDANG_(~TDANG@cpe-107-15-144-45.nc.res.rr.com) (Ping timeout: 252 seconds)
2021-09-25 15:54:04 +0200TDANG_(~TDANG@cpe-107-15-144-45.nc.res.rr.com)
2021-09-25 15:57:09 +0200Vajb(~Vajb@2001:999:61:625c:bbee:9460:f413:8697)
2021-09-25 16:00:29 +0200sneedsfeed(~sneedsfee@rrcs-173-95-122-169.midsouth.biz.rr.com) (Ping timeout: 256 seconds)
2021-09-25 16:03:16 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:c98f:a9cd:e1ea:d69a)
2021-09-25 16:07:46 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:c98f:a9cd:e1ea:d69a) (Ping timeout: 260 seconds)
2021-09-25 16:08:49 +0200fryguybob(~fryguybob@cpe-74-67-169-145.rochester.res.rr.com)
2021-09-25 16:10:17 +0200Vajb(~Vajb@2001:999:61:625c:bbee:9460:f413:8697) (Read error: Connection reset by peer)
2021-09-25 16:10:20 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
2021-09-25 16:13:50 +0200MQ-17J(~MQ-17J@8.6.144.233) (Ping timeout: 260 seconds)
2021-09-25 16:14:11 +0200cheater(~Username@user/cheater) (Ping timeout: 252 seconds)
2021-09-25 16:14:46 +0200cheater(~Username@user/cheater)
2021-09-25 16:18:20 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com)
2021-09-25 16:19:09 +0200Lycurgus(~juan@98.4.112.204) (Quit: Exeunt)
2021-09-25 16:20:57 +0200Hanicef(~gustaf@81-229-9-108-no92.tbcn.telia.com)
2021-09-25 16:22:41 +0200 <tomsmeding> maerwald: parental guidance is recommended when acquiring traits from rms
2021-09-25 16:24:12 +0200 <maerwald> lol
2021-09-25 16:28:46 +0200 <[exa]> but freedom!!!111
2021-09-25 16:31:42 +0200chris(~chris@81.96.113.213)
2021-09-25 16:31:45 +0200chrisGuest6440
2021-09-25 16:39:25 +0200acidjnk_new(~acidjnk@p200300d0c703cb723ce418ea93e3eeac.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
2021-09-25 16:41:25 +0200kimjetwav(~user@2607:fea8:235f:9730:8d3b:ad5a:287:4c82) (Remote host closed the connection)
2021-09-25 16:45:01 +0200 <tomsmeding> [exa]: careful
2021-09-25 16:46:18 +0200[exa]thinks "hey kids, careful with all that freedom"
2021-09-25 16:46:34 +0200Guest6440(~chris@81.96.113.213) (Remote host closed the connection)
2021-09-25 16:46:39 +0200 <maerwald> xD
2021-09-25 16:47:05 +0200maerwaldmakes a personal note: refrain from making rms jokes
2021-09-25 16:51:25 +0200chris(~chris@81.96.113.213)
2021-09-25 16:51:29 +0200chrisGuest4676
2021-09-25 16:52:48 +0200mikoto-chan(~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be)
2021-09-25 16:55:50 +0200Guest4676(~chris@81.96.113.213) (Ping timeout: 260 seconds)
2021-09-25 17:00:46 +0200waleee(~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd)
2021-09-25 17:00:58 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-09-25 17:00:58 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
2021-09-25 17:00:58 +0200wroathe(~wroathe@user/wroathe)
2021-09-25 17:04:57 +0200 <zzz> I want the State Monad. what's the import?
2021-09-25 17:05:07 +0200 <tomsmeding> Control.Monad.State.Strict from mtl
2021-09-25 17:05:34 +0200 <tomsmeding> or if you don't care about monad transformer lifting, Control.Monad.Trans.State.Strict from transformers
2021-09-25 17:06:18 +0200 <tomsmeding> zzz: in general, the basic monad transformers are defined in 'transformers', and 'mtl' then defines those MonadState etc classes around that
2021-09-25 17:06:19 +0200 <zzz> thank you
2021-09-25 17:13:05 +0200terrorjack(~terrorjac@ec2-35-181-134-114.eu-west-3.compute.amazonaws.com) (Quit: The Lounge - https://thelounge.chat)
2021-09-25 17:15:00 +0200terrorjack(~terrorjac@ec2-35-181-134-114.eu-west-3.compute.amazonaws.com)
2021-09-25 17:16:21 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-09-25 17:19:29 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:c98f:a9cd:e1ea:d69a)
2021-09-25 17:22:04 +0200terrorjack(~terrorjac@ec2-35-181-134-114.eu-west-3.compute.amazonaws.com) (Quit: The Lounge - https://thelounge.chat)
2021-09-25 17:24:38 +0200yauhsien(~yauhsien@61-231-35-247.dynamic-ip.hinet.net)
2021-09-25 17:25:01 +0200fryguybob(~fryguybob@cpe-74-67-169-145.rochester.res.rr.com) (Ping timeout: 252 seconds)
2021-09-25 17:25:09 +0200 <zzz> whoa. i have to relearn State
2021-09-25 17:25:39 +0200 <zzz> i was used to data State s a = State { runState :: s -> (a,s) }
2021-09-25 17:25:48 +0200 <zzz> what happened to that? :(
2021-09-25 17:25:50 +0200 <shapr> what's it doing now?
2021-09-25 17:26:34 +0200 <zzz> • Data constructor not in scope:
2021-09-25 17:26:44 +0200 <zzz> State :: ([Bool] -> (Int, [Bool])) -> State
2021-09-25 17:26:51 +0200 <zzz> • Perhaps you meant one of these:
2021-09-25 17:27:00 +0200 <zzz> ‘StateT’ (imported from Control.Monad.State.St
2021-09-25 17:27:02 +0200 <zzz> ...
2021-09-25 17:27:06 +0200boxscape_(~boxscape_@i577BCB22.versanet.de)
2021-09-25 17:29:44 +0200hexfive(~eric@50.35.83.177)
2021-09-25 17:30:00 +0200hexfive(~eric@50.35.83.177) (Client Quit)
2021-09-25 17:30:23 +0200 <cdsmith> Last-minute reminder that there's a virtual Haskell CoHack happening in 30 minutes. Info, signups and zoom link at https://www.meetup.com/NY-Haskell/events/280727563/
2021-09-25 17:30:32 +0200 <[exa]> zzz: use `state`
2021-09-25 17:31:12 +0200shapr(~user@pool-100-36-247-68.washdc.fios.verizon.net) (Remote host closed the connection)
2021-09-25 17:31:34 +0200 <zzz> [exa]: that's it. thanks
2021-09-25 17:31:42 +0200 <[exa]> zzz: using the constructor directly prevents the lower layer to actually have multiple (possibly better) implementations
2021-09-25 17:32:04 +0200 <zzz> ok i see
2021-09-25 17:33:01 +0200 <[exa]> in this case I guess you'd make it with something like `StateT \s -> Identity (a,s)` but well you see :]
2021-09-25 17:33:11 +0200 <zzz> yes
2021-09-25 17:33:13 +0200terrorjack(~terrorjac@ec2-35-181-134-114.eu-west-3.compute.amazonaws.com)
2021-09-25 17:33:20 +0200 <zzz> i'm not that into transformers
2021-09-25 17:33:50 +0200 <[exa]> it's most useful when you later realize that you actually want full RWST, no need to change code then. :D
2021-09-25 17:35:13 +0200shapr(~user@pool-100-36-247-68.washdc.fios.verizon.net)
2021-09-25 17:35:39 +0200 <Cajun> having recently learned RWST over IO, its very very nice to use. its basically magic (but it isnt!) how it lets you use any of the actions seamlessly
2021-09-25 17:35:59 +0200 <zzz> Read Write State Transformer?
2021-09-25 17:36:02 +0200 <[exa]> yep
2021-09-25 17:36:17 +0200 <dsal> That gets nasty if you need to unlift
2021-09-25 17:36:30 +0200 <Cajun> theres also just RWS but i havent used it
2021-09-25 17:36:44 +0200 <Cajun> seems very useful for a lot of stuff though
2021-09-25 17:36:55 +0200 <[exa]> kinda fun how the RWST IO catches the essence of so many programs
2021-09-25 17:37:02 +0200 <Cajun> dsal: why's that?
2021-09-25 17:37:19 +0200 <dsal> Because you can't generally unliftio state.
2021-09-25 17:37:31 +0200 <dsal> And that's the shape of most of my programs.
2021-09-25 17:37:54 +0200 <dsal> (lots of concurrency and io and stuff)
2021-09-25 17:38:29 +0200 <[exa]> dsal: that's for some stream processing I guess?
2021-09-25 17:38:47 +0200 <dsal> Something like that.
2021-09-25 17:39:16 +0200qbt(~edun@user/edun) (Quit: Leaving)
2021-09-25 17:39:47 +0200 <dsal> I've got a bit where I did that, but it's because the state portion wouldn't be changed during the part that would need the unlifting
2021-09-25 17:40:11 +0200[exa]reads the readme
2021-09-25 17:40:15 +0200 <[exa]> o cool
2021-09-25 17:40:15 +0200gioyik(~gioyik@gateway/tor-sasl/gioyik)
2021-09-25 17:40:50 +0200 <dsal> Putting TVars in the reader env works for my kind of junk.
2021-09-25 17:41:47 +0200_ak_(~akspecs@user/akspecs) (Ping timeout: 240 seconds)
2021-09-25 17:44:44 +0200 <yin[m]> can anyone explain to me the comcepts of lifting and unlifting? i keep reading that word and am not sure if it's always in the same context
2021-09-25 17:46:07 +0200zmt01(~zmt00@user/zmt00)
2021-09-25 17:47:33 +0200fjmorazan(~quassel@user/fjmorazan) (Quit: fjmorazan)
2021-09-25 17:48:13 +0200_ak_(~akspecs@136-24-181-20.cab.webpass.net)
2021-09-25 17:48:13 +0200_ak_(~akspecs@136-24-181-20.cab.webpass.net) (Changing host)
2021-09-25 17:48:13 +0200_ak_(~akspecs@user/akspecs)
2021-09-25 17:48:43 +0200terrorjack(~terrorjac@ec2-35-181-134-114.eu-west-3.compute.amazonaws.com) (Quit: The Lounge - https://thelounge.chat)
2021-09-25 17:49:50 +0200 <cdsmith> yin: There are actually a few different things that are meant by "lift" and "unlift" in Haskell. One is about data types, and the other is about monad transformers. Do you know which you mean?
2021-09-25 17:50:09 +0200korvos(uid486420@id-486420.tinside.irccloud.com) ()
2021-09-25 17:50:31 +0200hnOsmium0001(uid453710@id-453710.hampstead.irccloud.com)
2021-09-25 17:50:35 +0200tromp(~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2021-09-25 17:50:44 +0200 <yin[m]> no
2021-09-25 17:50:51 +0200 <cdsmith> Oh, the conversation above is about the monad transformer version.
2021-09-25 17:50:56 +0200 <[exa]> yin[m]: lifting = converting an operation that would run somewhere deeper in the transformer stack to an operation that runs conveniently on top of that transformer stack (say you're in StateT IO, you need to lift all IO operations because they don't know how to go through StateT)
2021-09-25 17:51:26 +0200 <yin[m]> i see
2021-09-25 17:51:44 +0200 <[exa]> yin[m]: unlifting = a solution to a very subtle problem described here https://hackage.haskell.org/package/unliftio
2021-09-25 17:52:26 +0200 <[exa]> kinda looks like reverse lifting, you have something that works on a transformer stack that's got IO down below, but you need to squeeze that operation into something that only understands plain IO
2021-09-25 17:53:20 +0200 <[exa]> I might have made oversimplifications but I hope the idea makes sense
2021-09-25 17:53:29 +0200TDANG(~TDANG@cpe-107-15-144-45.nc.res.rr.com)
2021-09-25 17:54:17 +0200 <[exa]> compare with e.g. 'liftA2' which is almost the same concept (making something work in a "more complicated environment") but outside the transformer context
2021-09-25 17:54:31 +0200 <yin[m]> i think it does. that's a bit too advanced for me yet but i think i get the gist of it
2021-09-25 17:54:52 +0200nrl^(~nrl@12.203.127.82)
2021-09-25 17:55:32 +0200 <[exa]> > liftA2 (,) (Just 1) (Just "phoo") -- makes the simple (,) work through Just's
2021-09-25 17:55:33 +0200 <cdsmith> Example of where you need unlifting: I'm running in some monad stack (m IO), and I want to fork a new thread. I want that new thread to run in the same monad transformer stack, so the code to run in that thread has type (m IO) as well. But `forkIO` expects it to have type `IO`. You can do it for *some* monad stacks, but not others
2021-09-25 17:55:34 +0200 <lambdabot> Just (1,"phoo")
2021-09-25 17:57:02 +0200TDANG_(~TDANG@cpe-107-15-144-45.nc.res.rr.com) (Ping timeout: 252 seconds)
2021-09-25 17:58:06 +0200 <[exa]> > flip runStateT 3 $ do { x <- get; lift (print x); put (x+1)}
2021-09-25 17:58:08 +0200 <lambdabot> <IO ((),Integer)>
2021-09-25 17:59:31 +0200 <[exa]> yin[m]: there ^ you have a monad that combines state with IO actions, of type `StateT Integer IO`. StateT actions (`get`, `put`) are accessible directly, but you need to lift the `print x` to make it work through StateT
2021-09-25 17:59:57 +0200 <[exa]> (pity lambdabot didn't print much results tho.)
2021-09-25 18:00:35 +0200chris(~chris@81.96.113.213)
2021-09-25 18:00:39 +0200chrisGuest1847
2021-09-25 18:02:03 +0200Guest90(~Guest90@DSL217-132-180-45.bb.netvision.net.il) (Quit: Client closed)
2021-09-25 18:04:02 +0200stiell(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2021-09-25 18:04:16 +0200hyiltiz(~quassel@31.220.5.250) (Ping timeout: 265 seconds)
2021-09-25 18:04:25 +0200stiell(~stiell@gateway/tor-sasl/stiell)
2021-09-25 18:04:29 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2021-09-25 18:05:06 +0200xiongxin(~quassel@113.116.34.58) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2021-09-25 18:05:14 +0200Guest1847(~chris@81.96.113.213) (Ping timeout: 265 seconds)
2021-09-25 18:05:42 +0200fjmorazan(~quassel@user/fjmorazan)
2021-09-25 18:08:32 +0200Partmedia(~kevinz@172-221-159-029.res.spectrum.com)
2021-09-25 18:13:25 +0200tzh(~tzh@c-24-21-73-154.hsd1.or.comcast.net)
2021-09-25 18:21:23 +0200darxun(sid504814@id-504814.tinside.irccloud.com) ()
2021-09-25 18:22:02 +0200tromp(~textual@dhcp-077-249-230-040.chello.nl)
2021-09-25 18:22:07 +0200hyiltiz(~quassel@31.220.5.250)
2021-09-25 18:22:59 +0200 <dsal> [exa]: yahb will
2021-09-25 18:23:12 +0200 <dsal> % flip runStateT 3 $ do { x <- get; lift (print x); put (x+1)}
2021-09-25 18:23:12 +0200 <yahb> dsal: ; <interactive>:88:35: error:; Ambiguous occurrence `lift'; It could refer to; either `Language.Haskell.TH.Syntax.lift', imported from `Language.Haskell.TH.Syntax'; or `Control.Monad.Cont.lift', imported from `Control.Monad.Cont' (and originally defined in `Control.Monad.Trans.Class')
2021-09-25 18:23:18 +0200 <dsal> Except for that.
2021-09-25 18:23:38 +0200 <dsal> % flip runStateT 3 $ do { x <- get; liftIO (print x); put (x+1)}
2021-09-25 18:23:38 +0200 <yahb> dsal: 3; ((),4)
2021-09-25 18:29:47 +0200_ak_(~akspecs@user/akspecs) (Ping timeout: 240 seconds)
2021-09-25 18:30:02 +0200TDANG_(~TDANG@cpe-107-15-144-45.nc.res.rr.com)
2021-09-25 18:30:22 +0200TDANG(~TDANG@cpe-107-15-144-45.nc.res.rr.com) (Ping timeout: 265 seconds)
2021-09-25 18:30:54 +0200_ak_(~akspecs@136-24-181-20.cab.webpass.net)
2021-09-25 18:30:54 +0200_ak_(~akspecs@136-24-181-20.cab.webpass.net) (Changing host)
2021-09-25 18:30:54 +0200_ak_(~akspecs@user/akspecs)
2021-09-25 18:31:13 +0200 <[exa]> wow cool, there's even more lifts :]
2021-09-25 18:33:45 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
2021-09-25 18:37:11 +0200oxide(~lambda@user/oxide) (Ping timeout: 252 seconds)
2021-09-25 18:39:33 +0200gustik(~gustik@2a01:c844:2410:9020:63ab:4bb6:83d2:e11b)
2021-09-25 18:41:09 +0200 <dsal> liftIO is particularly handy because IO is often at the bottom (and can only be at the bottom) and is a quite common need.
2021-09-25 18:41:11 +0200 <dsal> :t liftIO
2021-09-25 18:41:12 +0200 <lambdabot> MonadIO m => IO a -> m a
2021-09-25 18:41:56 +0200oxide(~lambda@user/oxide)
2021-09-25 18:42:43 +0200Vajb(~Vajb@2001:999:61:625c:bbee:9460:f413:8697)
2021-09-25 18:45:19 +0200chris(~chris@81.96.113.213)
2021-09-25 18:45:24 +0200chrisGuest1795
2021-09-25 18:49:50 +0200Guest1795(~chris@81.96.113.213) (Ping timeout: 252 seconds)
2021-09-25 18:50:23 +0200_ak_(~akspecs@user/akspecs) (Ping timeout: 252 seconds)
2021-09-25 18:50:34 +0200boxscape_(~boxscape_@i577BCB22.versanet.de) (Remote host closed the connection)
2021-09-25 18:50:42 +0200tromp(~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2021-09-25 18:51:23 +0200ub(~Thunderbi@178.115.71.159.wireless.dyn.drei.com)
2021-09-25 18:51:39 +0200fryguybob(~fryguybob@cpe-74-67-169-145.rochester.res.rr.com)
2021-09-25 18:54:07 +0200ubert(~Thunderbi@178.165.202.105.wireless.dyn.drei.com) (Ping timeout: 252 seconds)
2021-09-25 18:54:07 +0200ububert
2021-09-25 18:54:22 +0200ubert1(~Thunderbi@178.165.202.105.wireless.dyn.drei.com) (Ping timeout: 260 seconds)
2021-09-25 18:58:05 +0200mjs2600(~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) (Ping timeout: 252 seconds)
2021-09-25 19:00:53 +0200_ak_(~akspecs@136-24-181-20.cab.webpass.net)
2021-09-25 19:00:53 +0200_ak_(~akspecs@136-24-181-20.cab.webpass.net) (Changing host)
2021-09-25 19:00:53 +0200_ak_(~akspecs@user/akspecs)
2021-09-25 19:01:19 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 252 seconds)
2021-09-25 19:01:29 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-09-25 19:01:36 +0200gioyik(~gioyik@gateway/tor-sasl/gioyik) (Ping timeout: 276 seconds)
2021-09-25 19:18:06 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-09-25 19:18:07 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
2021-09-25 19:18:07 +0200wroathe(~wroathe@user/wroathe)
2021-09-25 19:23:03 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 265 seconds)
2021-09-25 19:26:26 +0200Hanicef(~gustaf@81-229-9-108-no92.tbcn.telia.com) (Quit: leaving)
2021-09-25 19:27:07 +0200mjs2600(~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net)
2021-09-25 19:29:24 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer)
2021-09-25 19:29:37 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com)
2021-09-25 19:31:01 +0200justsomeguy(~justsomeg@user/justsomeguy)
2021-09-25 19:33:47 +0200gioyik(~gioyik@gateway/tor-sasl/gioyik)
2021-09-25 19:33:49 +0200boxscape_(~boxscape_@i577BCB22.versanet.de)
2021-09-25 19:35:54 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
2021-09-25 19:40:36 +0200gioyik(~gioyik@gateway/tor-sasl/gioyik) (Ping timeout: 276 seconds)
2021-09-25 19:40:52 +0200mikoto-chan(~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 252 seconds)
2021-09-25 19:51:04 +0200boxscape_(~boxscape_@i577BCB22.versanet.de) (Quit: Connection closed)
2021-09-25 19:52:12 +0200sneedsfeed(~sneedsfee@rrcs-173-95-122-169.midsouth.biz.rr.com)
2021-09-25 19:52:33 +0200yauhsien(~yauhsien@61-231-35-247.dynamic-ip.hinet.net) (Remote host closed the connection)
2021-09-25 19:53:06 +0200yauhsien(~yauhsien@61-231-35-247.dynamic-ip.hinet.net)
2021-09-25 19:54:55 +0200Guest80(~Guest80@eth-west-pareq2-46-193-4-100.wb.wifirst.net)
2021-09-25 19:54:56 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer)
2021-09-25 19:55:41 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com)
2021-09-25 19:58:02 +0200yauhsien(~yauhsien@61-231-35-247.dynamic-ip.hinet.net) (Ping timeout: 252 seconds)
2021-09-25 20:02:36 +0200Vajb(~Vajb@2001:999:61:625c:bbee:9460:f413:8697) (Read error: Connection reset by peer)
2021-09-25 20:02:57 +0200Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
2021-09-25 20:04:19 +0200gustik(~gustik@2a01:c844:2410:9020:63ab:4bb6:83d2:e11b) (Quit: Leaving)
2021-09-25 20:04:37 +0200machinedgod(~machinedg@24.105.81.50) (Ping timeout: 265 seconds)
2021-09-25 20:04:59 +0200Pickchea(~private@user/pickchea)
2021-09-25 20:06:07 +0200max22-(~maxime@2a01cb088335980064e1e8ac26e1f95e.ipv6.abo.wanadoo.fr) (Ping timeout: 240 seconds)
2021-09-25 20:11:15 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-09-25 20:13:00 +0200justsomeguy(~justsomeg@user/justsomeguy) (Ping timeout: 250 seconds)
2021-09-25 20:13:13 +0200zmt00(~zmt00@user/zmt00)
2021-09-25 20:15:10 +0200zmt01(~zmt00@user/zmt00) (Ping timeout: 250 seconds)
2021-09-25 20:16:07 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
2021-09-25 20:16:44 +0200oxide(~lambda@user/oxide) (Ping timeout: 252 seconds)
2021-09-25 20:18:40 +0200oxide(~lambda@user/oxide)
2021-09-25 20:18:40 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer)
2021-09-25 20:18:54 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com)
2021-09-25 20:19:29 +0200tromp(~textual@dhcp-077-249-230-040.chello.nl)
2021-09-25 20:23:00 +0200Guest80(~Guest80@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Quit: Client closed)
2021-09-25 20:29:28 +0200tromp(~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2021-09-25 20:30:47 +0200ack_inc(~anirudh@122.161.190.207) (Quit: Leaving.)
2021-09-25 20:31:13 +0200werneta(~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
2021-09-25 20:32:12 +0200lavaman(~lavaman@98.38.249.169)
2021-09-25 20:33:48 +0200Lewky(~Lewky@146.70.50.74) (WeeChat 2.8)
2021-09-25 20:34:40 +0200tromp(~textual@dhcp-077-249-230-040.chello.nl)
2021-09-25 20:36:20 +0200gioyik(~gioyik@gateway/tor-sasl/gioyik)
2021-09-25 20:37:03 +0200max22-(~maxime@2a01cb0883359800cacb285e285b0a86.ipv6.abo.wanadoo.fr)
2021-09-25 20:38:35 +0200 <zzz> what's this about? https://wiki.haskell.org/Keywords#proc
2021-09-25 20:39:00 +0200 <monochrom> Arrow, as it says and has links to.
2021-09-25 20:39:25 +0200cheater(~Username@user/cheater) (Ping timeout: 265 seconds)
2021-09-25 20:39:29 +0200Null_A(~null_a@2601:645:8700:2290:e8cb:df45:c587:6435)
2021-09-25 20:39:40 +0200byorgey(~byorgey@155.138.238.211) (Quit: leaving)
2021-09-25 20:39:44 +0200cheater(~Username@user/cheater)
2021-09-25 20:39:49 +0200byorgey(~byorgey@155.138.238.211)
2021-09-25 20:40:10 +0200 <c_wraith> I have never seen an explanation of why Arrow is worth learning all the special syntax for. So I never have.
2021-09-25 20:40:19 +0200Sgeo(~Sgeo@user/sgeo)
2021-09-25 20:40:41 +0200byorgey(~byorgey@155.138.238.211) (Client Quit)
2021-09-25 20:40:49 +0200byorgey(~byorgey@155.138.238.211)
2021-09-25 20:41:01 +0200 <monochrom> If Applicative did not exist, or Lava still used Haskell, I would be able to refer to those use cases.
2021-09-25 20:41:07 +0200 <c_wraith> I just learned about QualifiedDo and that makes me nervous enough
2021-09-25 20:41:42 +0200gioyik(~gioyik@gateway/tor-sasl/gioyik) (Ping timeout: 276 seconds)
2021-09-25 20:42:50 +0200 <monochrom> Arrow also had a chance with FRP, IIRC.
2021-09-25 20:43:10 +0200 <c_wraith> didn't it turn out that Applicative worked just as well there, too?
2021-09-25 20:43:31 +0200 <monochrom> I forgot. Wouldn't be surprised. :)
2021-09-25 20:44:51 +0200 <sneedsfeed> whats the best way to handle a situation where I want to add a value to a list if a condition holds but not add anything to the list if it fails? haskell doesn't seem to like this kind of thing because I always need to specify an else and it has to be the right type so it kind of forces me to stick values in the list when I don't want to.
2021-09-25 20:45:35 +0200 <awpr> `if cond then (thing:) else id $ restOfList`
2021-09-25 20:45:44 +0200 <c_wraith> $ doesn't work there
2021-09-25 20:45:54 +0200 <awpr> right, needs parens
2021-09-25 20:46:59 +0200 <awpr> or `(guard cond >> [thing]) ++ restOfList`
2021-09-25 20:47:23 +0200 <tomsmeding> `when cond thing ++ restOfList`
2021-09-25 20:47:38 +0200tromp(~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2021-09-25 20:47:42 +0200 <awpr> or list comprehension abuse: `[thing | cond] ++ restOfList`
2021-09-25 20:47:57 +0200 <sneedsfeed> my compiler is barking at me "pattern matches non exhaustive"
2021-09-25 20:48:06 +0200 <sneedsfeed> er IDE is barking at me
2021-09-25 20:48:11 +0200tromp(~textual@dhcp-077-249-230-040.chello.nl)
2021-09-25 20:48:19 +0200dexmad[m](~dexmadmat@2001:470:69fc:105::e056)
2021-09-25 20:48:50 +0200 <monochrom> What pattern?
2021-09-25 20:50:33 +0200kjak(~kjak@pool-108-45-56-21.washdc.fios.verizon.net)
2021-09-25 20:50:56 +0200 <sneedsfeed> h/o i'll show you the function i'm trying to make, hopefully it will make enough sense out of context
2021-09-25 20:51:42 +0200kayprish(~kayprish@46.240.130.158)
2021-09-25 20:53:22 +0200 <sneedsfeed> https://paste.tomsmeding.com/vficPciN
2021-09-25 20:54:21 +0200 <sneedsfeed> it doesnt work obviously.
2021-09-25 20:55:22 +0200 <monochrom> > let n | 5>6 = 1 in n
2021-09-25 20:55:23 +0200 <lambdabot> *Exception: <interactive>:3:5-15: Non-exhaustive patterns in function n
2021-09-25 20:55:27 +0200 <monochrom> Like that?
2021-09-25 20:56:57 +0200chris(~chris@81.96.113.213)
2021-09-25 20:57:01 +0200chrisGuest1560
2021-09-25 20:57:14 +0200 <sneedsfeed> I mean yea. Except its worse because its actually going to evaluate the other way like half the time.
2021-09-25 20:57:23 +0200gioyik(~gioyik@gateway/tor-sasl/gioyik)
2021-09-25 20:57:46 +0200 <monochrom> So make a decision what should my n be if not(5>6).
2021-09-25 20:57:55 +0200 <sneedsfeed> I'm testing if a given direction is a valid way to move in the maze, if it is I want to add it to a list, if its not I want to ignore it.
2021-09-25 20:57:56 +0200brettgilio(~brettgili@x-node.gq) (Quit: Leaving...)
2021-09-25 20:58:06 +0200 <monochrom> And write down that decision as code.
2021-09-25 20:58:19 +0200 <sneedsfeed> Sure of course I would use Maybe I assume
2021-09-25 20:58:33 +0200 <awpr> the list you've written unconditionally has four elements, and some of them are just pattern-match failure errors
2021-09-25 20:58:34 +0200 <sneedsfeed> but that seems inefficient compared to just ignoring the case
2021-09-25 20:58:41 +0200 <monochrom> "ignore" ≠ "don't tell the computer what to do"
2021-09-25 20:59:17 +0200 <monochrom> "say nothing" ≠ "tell the computer to do nothing"
2021-09-25 20:59:21 +0200 <sneedsfeed> wait wait I think I know
2021-09-25 20:59:27 +0200brettgilio(~brettgili@x-node.gq)
2021-09-25 20:59:35 +0200 <awpr> you could build a list of the four candidate directions and get rid of the ones that aren't valid using `filter`
2021-09-25 20:59:49 +0200lavaman(~lavaman@98.38.249.169) (Remote host closed the connection)
2021-09-25 21:00:17 +0200 <sneedsfeed> I can take the list as input, return an amended one if its valid, and just return the original list if its not
2021-09-25 21:00:18 +0200 <monochrom> I would pretty much use the [x1 | cond1] ++ [x2 | cond2] ++ ... idea.
2021-09-25 21:00:24 +0200tromp(~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2021-09-25 21:00:47 +0200 <tomsmeding> given the form of the conditions, awpr's idea seems nice
2021-09-25 21:00:59 +0200 <awpr> in this case since `cond_i` is of the form `pred x_i`, `filter` is applicable
2021-09-25 21:01:07 +0200Guest1560(~chris@81.96.113.213) (Ping timeout: 240 seconds)
2021-09-25 21:02:30 +0200gioyik(~gioyik@gateway/tor-sasl/gioyik) (Ping timeout: 276 seconds)
2021-09-25 21:03:13 +0200 <monochrom> As for "efficiency" "performance" I only know two meanings.
2021-09-25 21:03:38 +0200 <monochrom> One meaning is the big-O kind, which means this case doesn't matter.
2021-09-25 21:03:39 +0200 <sneedsfeed> https://paste.tomsmeding.com/AGR2dfcx yep that is pretty good
2021-09-25 21:04:16 +0200 <monochrom> The other meaning is real time on real computer, which means if you haven't seen what asm code GHC generates you're talking out of your *ss.
2021-09-25 21:04:33 +0200 <tomsmeding> monochrom: I said "nice", not "fast" ;)
2021-09-25 21:04:58 +0200 <monochrom> Oh, I'm just picking on "seems inefficient".
2021-09-25 21:05:32 +0200 <sneedsfeed> no its a valid point mono, I have no idea what sort of bytecode GHC is really producing for a given input
2021-09-25 21:05:55 +0200 <sneedsfeed> it may look at this filter situation and not actually assign the values to a list then remove them again
2021-09-25 21:06:09 +0200 <sneedsfeed> it may be smart enough to know not to assign them in the first place for all i know
2021-09-25 21:07:10 +0200 <tomsmeding> I suspect that in terms of actual cpu time, you're not going to get anything faster than this filter form, assuming you don't modify testMove
2021-09-25 21:07:46 +0200shapr(~user@pool-100-36-247-68.washdc.fios.verizon.net) (Ping timeout: 252 seconds)
2021-09-25 21:08:59 +0200 <sneedsfeed> thanks everyone who took a look (y) i'm happy with this filter form
2021-09-25 21:11:32 +0200oxide(~lambda@user/oxide) (Quit: oxide)
2021-09-25 21:16:01 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 252 seconds)
2021-09-25 21:17:47 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2021-09-25 21:19:51 +0200abhixec(~abhixec@c-67-169-139-16.hsd1.ca.comcast.net)
2021-09-25 21:21:31 +0200cheater(~Username@user/cheater) (Ping timeout: 252 seconds)
2021-09-25 21:23:33 +0200tromp(~textual@dhcp-077-249-230-040.chello.nl)
2021-09-25 21:24:20 +0200yauhsien(~yauhsien@61-231-35-247.dynamic-ip.hinet.net)
2021-09-25 21:26:15 +0200Null_A(~null_a@2601:645:8700:2290:e8cb:df45:c587:6435) (Remote host closed the connection)
2021-09-25 21:28:17 +0200 <cdsmith> Is there a widely known ADT in base with two constructors and at least two fields for one of them? Need it for documentation.
2021-09-25 21:28:58 +0200 <maerwald> that's oddly specific
2021-09-25 21:29:01 +0200 <awpr> `[]` fits that, but it might not be suitable
2021-09-25 21:29:12 +0200yauhsien(~yauhsien@61-231-35-247.dynamic-ip.hinet.net) (Ping timeout: 265 seconds)
2021-09-25 21:29:42 +0200 <awpr> e.g. since you can't actually define its "nil" constructor in surface Haskell
2021-09-25 21:30:12 +0200gioyik(~gioyik@gateway/tor-sasl/gioyik)
2021-09-25 21:30:59 +0200 <cdsmith> Oh yeah. It needs to be named. Otherwise, the TH I'm documenting doesn't work, since it needs a Name
2021-09-25 21:31:54 +0200 <tomsmeding> cdsmith: "widely known" is debatable, but I found one: https://hackage.haskell.org/package/base-4.14.0.0/docs/System-Console-GetOpt.html#t:ArgDescr
2021-09-25 21:32:42 +0200 <cdsmith> Oh, yeah, that's an interesting one. I like the functions, too. Chances to show off some higher order combinators
2021-09-25 21:35:36 +0200acidjnk_new(~acidjnk@p200300d0c703cb723ce418ea93e3eeac.dip0.t-ipconnect.de)
2021-09-25 21:36:07 +0200takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2021-09-25 21:40:58 +0200tromp(~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2021-09-25 21:41:32 +0200chris(~chris@81.96.113.213)
2021-09-25 21:41:36 +0200chrisGuest6828
2021-09-25 21:44:54 +0200zer0bitz(~zer0bitz@dsl-hkibng31-54fafc-123.dhcp.inet.fi)
2021-09-25 21:46:16 +0200Guest6828(~chris@81.96.113.213) (Ping timeout: 252 seconds)
2021-09-25 21:47:58 +0200kenran(~kenran@200116b82bce9700bd53594d48cebdcd.dip.versatel-1u1.de)
2021-09-25 21:48:12 +0200theproffesor(~theproffe@2601:282:847f:8010::7704)
2021-09-25 21:48:12 +0200theproffesor(~theproffe@2601:282:847f:8010::7704) (Changing host)
2021-09-25 21:48:12 +0200theproffesor(~theproffe@user/theproffesor)
2021-09-25 21:48:47 +0200ubert(~Thunderbi@178.115.71.159.wireless.dyn.drei.com) (Ping timeout: 240 seconds)
2021-09-25 21:50:28 +0200nfd(~nfd@user/nfd) (Ping timeout: 265 seconds)
2021-09-25 21:51:36 +0200ubert(~Thunderbi@178.115.71.159.wireless.dyn.drei.com)
2021-09-25 21:56:52 +0200theproffesor(~theproffe@user/theproffesor) (Leaving)
2021-09-25 21:57:09 +0200tromp(~textual@dhcp-077-249-230-040.chello.nl)
2021-09-25 21:59:45 +0200justsomeguy(~justsomeg@user/justsomeguy)
2021-09-25 21:59:53 +0200wootehfoot(~wootehfoo@user/wootehfoot)
2021-09-25 22:00:03 +0200nrl^(~nrl@12.203.127.82) (Remote host closed the connection)
2021-09-25 22:01:07 +0200Mateusz(~Mateusz@77-254-3-194.adsl.inetia.pl)
2021-09-25 22:01:09 +0200Sgeo_(~Sgeo@user/sgeo)
2021-09-25 22:03:39 +0200 <Mateusz> Hi All! I'm having hard time understanding why I can't write this `foldl` with printf: https://paste.tomsmeding.com/p17krk9e
2021-09-25 22:03:59 +0200Sgeo(~Sgeo@user/sgeo) (Ping timeout: 252 seconds)
2021-09-25 22:05:12 +0200Sgeo(~Sgeo@user/sgeo)
2021-09-25 22:05:58 +0200cheater(~Username@user/cheater)
2021-09-25 22:07:29 +0200 <zzz> Mateusz: what do you intend with it?
2021-09-25 22:08:17 +0200tromp(~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2021-09-25 22:08:21 +0200Sgeo_(~Sgeo@user/sgeo) (Ping timeout: 265 seconds)
2021-09-25 22:08:32 +0200 <Mateusz> I want to pass variable number of args to printf so I cant know in advance how many I pass
2021-09-25 22:11:46 +0200_ht(~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection)
2021-09-25 22:12:16 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-09-25 22:13:12 +0200yauhsien(~yauhsien@118-167-47-211.dynamic-ip.hinet.net)
2021-09-25 22:13:13 +0200MQ-17J(~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Ping timeout: 252 seconds)
2021-09-25 22:13:31 +0200MQ-17J(~MQ-17J@8.6.144.233)
2021-09-25 22:16:30 +0200 <[exa]> Mateusz: you would need a printf with different static type for each different incoming list, which is a bit problematic
2021-09-25 22:17:44 +0200yauhsien(~yauhsien@118-167-47-211.dynamic-ip.hinet.net) (Ping timeout: 252 seconds)
2021-09-25 22:20:12 +0200lavaman(~lavaman@98.38.249.169)
2021-09-25 22:21:06 +0200 <Cajun> is there any way to set default cabal build options in the .cabal or by individual .hs files? i want to put `--allow-newer` in a local library and a local executable, but i cant figure out how to in the .cabal file
2021-09-25 22:21:50 +0200 <[exa]> in particular, `printf "someformat"` returns `PrintfType r -> r` which is a polymorphic value that is able to match the argument list (a bit), OTOH `foldl` allows only a single type in there
2021-09-25 22:22:42 +0200boxscape_(~boxscape_@i577BCB22.versanet.de)
2021-09-25 22:24:02 +0200 <awpr> might be able to do something with `newtype AnyPrintf = AnyPrintf (forall r. PrintfType r => r)`, instantiating it with `->` at each step and then unwrapping it to a `String` at the end
2021-09-25 22:24:51 +0200 <[exa]> Cajun: https://github.com/haskell/cabal/issues/2756 might be related?
2021-09-25 22:24:53 +0200lavaman(~lavaman@98.38.249.169) (Ping timeout: 252 seconds)
2021-09-25 22:25:14 +0200 <monochrom> No, you have a million statically different printfs and you are saying you are choosing one based on only-dynamically-known list length.
2021-09-25 22:26:45 +0200 <monochrom> Not to mention that foldl is the wrong thing if you plan to "tell it I have hit the end".
2021-09-25 22:26:50 +0200justsomeguy(~justsomeg@user/justsomeguy) (Quit: WeeChat 3.2)
2021-09-25 22:27:06 +0200 <awpr> hm, the implementation of `PrintfType` isn't exported
2021-09-25 22:27:23 +0200 <[exa]> Mateusz: perhaps just go with `intercalate` or something :]
2021-09-25 22:28:46 +0200 <Cajun> [exa]: not really, no. that seems to be talking about nix and using the command on the commandline, neither of which i want to use. i see there is this thing called `cabal.project.local` but when i put `allow-newer: True` in there it didnt set it as a flag when using `cabal build`
2021-09-25 22:29:45 +0200 <[exa]> ah so
2021-09-25 22:33:41 +0200 <Cajun> i think i got it but an explanation of how to even use project files would be nice. i did the following: `packages: [cabal file]` then `allow-newer: all` on the next line
2021-09-25 22:35:35 +0200 <awpr> so, disclaimer needed that this is not something one _should_ do, but it is possible: https://paste.tomsmeding.com/Tb7ASd6i
2021-09-25 22:37:11 +0200 <[exa]> awpr: I still vote for intercalate. :D
2021-09-25 22:37:15 +0200 <[exa]> or concat
2021-09-25 22:37:43 +0200 <awpr> yeah, I just wanted to play with types :)
2021-09-25 22:39:36 +0200 <[exa]> would even make sense to zip it with format strings etc
2021-09-25 22:40:04 +0200 <[exa]> for greater good
2021-09-25 22:40:06 +0200terrorjack(~terrorjac@ec2-13-37-149-154.eu-west-3.compute.amazonaws.com)
2021-09-25 22:40:14 +0200 <[exa]> polymorphic lists go
2021-09-25 22:45:40 +0200 <Mateusz> exa awpr thanks for help I will go with something simpler then
2021-09-25 22:46:20 +0200jumper149(~jumper149@80.240.31.34) (Ping timeout: 252 seconds)
2021-09-25 22:46:21 +0200 <Mateusz> solution with RankNTypes looks interesting as mental exercise
2021-09-25 22:46:49 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
2021-09-25 22:48:31 +0200wroathe(~wroathe@user/wroathe)
2021-09-25 22:52:19 +0200MQ-17J(~MQ-17J@8.6.144.233) (Ping timeout: 252 seconds)
2021-09-25 22:52:21 +0200econo(uid147250@user/econo)
2021-09-25 22:53:25 +0200MQ-17J(~MQ-17J@8.6.144.233)
2021-09-25 22:56:38 +0200 <[exa]> Mateusz: technically the haskell `printf` implementation might have been a mental exercise :D
2021-09-25 22:56:56 +0200 <[exa]> I'm kinda avoiding it
2021-09-25 22:57:46 +0200MQ-17J(~MQ-17J@8.6.144.233) (Ping timeout: 252 seconds)
2021-09-25 22:59:15 +0200MQ-17J(~MQ-17J@8.6.144.233)
2021-09-25 23:02:08 +0200 <Mateusz> yea it seems like its there but not so popular. I'm learning haskell right now so thought it might be best to stick to base because default libraries tend to be decent solution for newcomers. Problem with concat/intercalate is that I was looking for declarative string formatting so its convenient to put formats inside template, then just render
2021-09-25 23:04:20 +0200 <[exa]> yeah I have to say that the absence of "nice standard printing" kindof hurts
2021-09-25 23:05:55 +0200 <[exa]> I was recommending stuff like `putStrLn $ concat ["string", show a, show 123, "end"]`, possible with `intercalate` there, but it looks crude right. :D
2021-09-25 23:06:37 +0200 <awpr> easy fix, just need a type-level parser combinator library
2021-09-25 23:08:51 +0200[exa]starts typing the extension pragma list
2021-09-25 23:09:19 +0200MQ-17J(~MQ-17J@8.6.144.233) (Ping timeout: 252 seconds)
2021-09-25 23:09:22 +0200 <awpr> disregard the fact that Symbol doesn't give you a way to uncons or split the string AFAIK
2021-09-25 23:09:33 +0200 <Mateusz> so compare to format `"string {a} {num} end"` from the template is clear what it does and what goes where. Thanks awpr seems like finally got motivation to dive into type-level parser combinators :D
2021-09-25 23:10:00 +0200Lord_of_Life_(~Lord@user/lord-of-life/x-2819915)
2021-09-25 23:10:02 +0200MQ-17J(~MQ-17J@8.6.144.233)
2021-09-25 23:10:16 +0200 <awpr> I don't think it's actually possible to get good results with current Haskell sadly
2021-09-25 23:10:28 +0200TDANG_(~TDANG@cpe-107-15-144-45.nc.res.rr.com) (Ping timeout: 252 seconds)
2021-09-25 23:10:31 +0200 <[exa]> there's some template haskell stuff
2021-09-25 23:11:00 +0200jumper149(~jumper149@80.240.31.34)
2021-09-25 23:11:02 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 260 seconds)
2021-09-25 23:11:17 +0200Lord_of_Life_Lord_of_Life
2021-09-25 23:11:21 +0200 <[exa]> ha, check out Data.String.Interpolate (pkg `interpolate`)
2021-09-25 23:11:59 +0200 <awpr> huh, that looks pretty nice
2021-09-25 23:12:24 +0200 <c_wraith> awpr: https://hackage.haskell.org/package/typelits-printf-0.2.0.0/docs/GHC-TypeLits-Printf.html
2021-09-25 23:12:43 +0200 <c_wraith> awpr: it turns out that while you can't uncons a Symbol, you can use horrible hacks involving <
2021-09-25 23:13:03 +0200fendor_(~fendor@178.115.43.157.wireless.dyn.drei.com) (Remote host closed the connection)
2021-09-25 23:14:40 +0200 <awpr> lmao I saw the compare function and had a vague notion it could be abused to inspect the string, but I'm astonished someone actually went and did it
2021-09-25 23:17:20 +0200kayprish(~kayprish@46.240.130.158) (Remote host closed the connection)
2021-09-25 23:17:32 +0200lavaman(~lavaman@98.38.249.169)
2021-09-25 23:18:13 +0200kenran(~kenran@200116b82bce9700bd53594d48cebdcd.dip.versatel-1u1.de) (Quit: WeeChat info:version)
2021-09-25 23:31:55 +0200MQ-17J(~MQ-17J@8.6.144.233) (Ping timeout: 252 seconds)
2021-09-25 23:32:06 +0200Mateusz(~Mateusz@77-254-3-194.adsl.inetia.pl) (Quit: Client closed)
2021-09-25 23:35:18 +0200ubert(~Thunderbi@178.115.71.159.wireless.dyn.drei.com) (Ping timeout: 260 seconds)
2021-09-25 23:36:48 +0200jumper149(~jumper149@80.240.31.34) (Quit: WeeChat 3.2.1)
2021-09-25 23:39:24 +0200rtjure(~rtjure@bras-79-132-17-74.comnet.bg)
2021-09-25 23:46:02 +0200chomwitt(~chomwitt@2a02:587:dc0a:5800:12c3:7bff:fe6d:d374) (Ping timeout: 260 seconds)
2021-09-25 23:46:44 +0200Null_A(~null_a@2601:645:8700:2290:91f2:4a69:be9c:a77e)
2021-09-25 23:47:14 +0200gehmehgeh(~user@user/gehmehgeh) (Quit: Leaving)
2021-09-25 23:53:38 +0200__monty__(~toonn@user/toonn) (Quit: leaving)
2021-09-25 23:55:22 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Quit: WeeChat 3.2.1)
2021-09-25 23:56:21 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2021-09-25 23:57:36 +0200machinedgod(~machinedg@24.105.81.50)
2021-09-25 23:58:12 +0200zebrag(~chris@user/zebrag)
2021-09-25 23:58:18 +0200madjestic(~madjestic@88-159-247-120.fixed.kpn.net)