Logs on 2023-09-03 (liberachat/#haskell)
| 00:00:02 | × | nek0 quits (~nek0@2a01:4f8:222:2b41::12) (*.net *.split) |
| 00:00:02 | × | V quits (~v@ircpuzzles/2022/april/winner/V) (*.net *.split) |
| 00:00:02 | × | ncf quits (~n@monade.li) (*.net *.split) |
| 00:00:02 | × | dsrt^ quits (~cd@c-66-56-7-24.hsd1.ga.comcast.net) (*.net *.split) |
| 00:00:02 | × | polux quits (~polux@51-15-169-172.rev.poneytelecom.eu) (*.net *.split) |
| 00:00:02 | × | Franciman quits (~Franciman@mx1.fracta.dev) (*.net *.split) |
| 00:00:02 | × | biberu quits (~biberu@user/biberu) (*.net *.split) |
| 00:00:02 | × | EsoAlgo81 quits (~EsoAlgo@129.146.136.145) (*.net *.split) |
| 00:00:18 | → | nek0 joins (~nek0@2a01:4f8:222:2b41::12) |
| 00:00:27 | → | dsrt^ joins (~cd@c-66-56-7-24.hsd1.ga.comcast.net) |
| 00:00:48 | → | polux joins (~polux@51-15-169-172.rev.poneytelecom.eu) |
| 00:00:48 | → | V joins (~v@ircpuzzles/2022/april/winner/V) |
| 00:00:49 | → | Franciman joins (~Franciman@mx1.fracta.dev) |
| 00:00:56 | → | EsoAlgo81 joins (~EsoAlgo@129.146.136.145) |
| 00:00:57 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 246 seconds) |
| 00:01:12 | → | biberu joins (~biberu@user/biberu) |
| 00:01:41 | → | ncf joins (~n@monade.li) |
| 00:02:27 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 00:03:10 | × | susul quits (~susul@user/susul) (Quit: WeeChat 3.0) |
| 00:03:52 | → | califax joins (~califax@user/califx) |
| 00:10:21 | × | hpc quits (~juzz@ip98-169-35-163.dc.dc.cox.net) (Ping timeout: 248 seconds) |
| 00:11:57 | × | harveypwca quits (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving) |
| 00:13:20 | × | waleee quits (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) (Ping timeout: 246 seconds) |
| 00:13:45 | → | waleee joins (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) |
| 00:20:13 | × | artem quits (~artem@73.145.240.184) (Read error: Connection reset by peer) |
| 00:20:15 | → | ulysses4ever joins (~artem@73.145.240.184) |
| 00:41:34 | × | fr33domlover quits (~fr33domlo@towards.vision) (Remote host closed the connection) |
| 00:42:07 | → | hpc joins (~juzz@ip98-169-35-163.dc.dc.cox.net) |
| 00:42:40 | → | fr33domlover joins (~fr33domlo@towards.vision) |
| 00:43:50 | × | jero98772 quits (~jero98772@2800:484:1d84:300::2) (Ping timeout: 245 seconds) |
| 00:44:03 | → | artem joins (~artem@c-73-103-90-145.hsd1.in.comcast.net) |
| 00:45:01 | × | falafel quits (~falafel@62.175.113.194.dyn.user.ono.com) (Ping timeout: 255 seconds) |
| 00:46:54 | × | ulysses4ever quits (~artem@73.145.240.184) (Read error: Connection reset by peer) |
| 00:48:02 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 00:48:28 | <justsomeguy> | How can I list all processes using Haskell? (I'm on a Linux box.) |
| 00:49:58 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Client Quit) |
| 00:51:59 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 00:53:32 | <geekosaur> | @tell justsomeguy they're native executables, not interpreted programs like with js or python. you can't even check for specific shared objects because haskell libraries including HSrts are usually linked statically |
| 00:53:32 | <lambdabot> | Consider it noted. |
| 00:54:16 | → | Square joins (~Square@user/square) |
| 00:55:41 | → | jero98772 joins (~jero98772@2800:484:1d84:300::2) |
| 00:56:21 | <geekosaur> | @tell justsomeguy you might be able to inspect memory mappings in /proc to discover processes that have 1TB page tables, but I don't know what that looks like ottomh |
| 00:56:21 | <lambdabot> | Consider it noted. |
| 00:57:49 | <probie> | Given that GHC's calling convention is rather unique, it's probably possible to write something to inspect a binary and determine if it was built by GHC |
| 01:00:54 | × | migas quits (~migas@astra4961.startdedicated.net) (Quit: The Lounge - https://thelounge.github.io) |
| 01:01:37 | → | migas joins (~migas@astra4961.startdedicated.net) |
| 01:02:29 | × | migas quits (~migas@astra4961.startdedicated.net) (Client Quit) |
| 01:03:44 | <geekosaur[c]> | `strings` will suffice there |
| 01:04:43 | <geekosaur[c]> | But it's still inspecting every binary instead of using something in e.g. `ps` |
| 01:07:14 | → | migas joins (~migas@astra4961.startdedicated.net) |
| 01:11:07 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 01:12:39 | → | glider joins (~glider@user/glider) |
| 01:17:14 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 01:22:11 | × | waleee quits (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) (Ping timeout: 246 seconds) |
| 01:26:21 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 250 seconds) |
| 01:30:34 | <monochrom> | In /proc/<pid>/maps, look for dynamic linking to libgmp. :) |
| 01:32:24 | <monochrom> | also in /proc/<pid>/fd you will find an unusual amount of pipes and timers. |
| 01:32:24 | × | gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer) |
| 01:32:39 | → | gentauro joins (~gentauro@user/gentauro) |
| 01:34:29 | <wroathe> | https://gist.github.com/JustinChristensen/0c1d994d6f350228e6b9ae8a64f252e4 |
| 01:34:42 | <wroathe> | ^ Is there a way to avoid duplicating this instance? |
| 01:35:00 | <wroathe> | And instead doing something at a type level like c == PrimaryKey |
| 01:35:46 | → | bratwurst joins (~blaadsfa@2604:3d09:207f:f650:216:3eff:fe5a:a1f8) |
| 01:40:19 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 01:48:28 | × | YuutaW quits (~YuutaW@mail.yuuta.moe) (Ping timeout: 246 seconds) |
| 01:48:38 | × | bratwurst quits (~blaadsfa@2604:3d09:207f:f650:216:3eff:fe5a:a1f8) (Ping timeout: 246 seconds) |
| 01:51:08 | × | otto_s quits (~user@p4ff27f1b.dip0.t-ipconnect.de) (Ping timeout: 248 seconds) |
| 01:52:44 | → | otto_s joins (~user@p4ff279d3.dip0.t-ipconnect.de) |
| 01:54:14 | × | ft quits (~ft@p508db658.dip0.t-ipconnect.de) (Ping timeout: 246 seconds) |
| 01:56:06 | → | ft joins (~ft@p4fc2a8a4.dip0.t-ipconnect.de) |
| 01:58:25 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 250 seconds) |
| 01:59:58 | × | Luj quits (~Luj@2a01:e0a:5f9:9681:92c9:bd26:afaf:3abb) (Quit: Ping timeout (120 seconds)) |
| 02:00:17 | → | Luj joins (~Luj@2a01:e0a:5f9:9681:fdb9:f3db:714b:2596) |
| 02:03:59 | × | Square quits (~Square@user/square) (Remote host closed the connection) |
| 02:07:03 | × | shapr quits (~user@2600:1700:c640:3100:4da3:c612:34c4:c6d4) (Remote host closed the connection) |
| 02:07:10 | × | myme quits (~myme@2a01:799:d60:e400:931b:da7a:83d:85fa) (Ping timeout: 245 seconds) |
| 02:07:16 | → | shapr joins (~user@2600:1700:c640:3100:8df1:aed4:1a6e:c7e2) |
| 02:07:24 | × | hyvoid quits (~hyenavoid@222-0-178-69.static.gci.net) (Quit: WeeChat 4.0.4) |
| 02:08:19 | → | myme joins (~myme@2a01:799:d60:e400:fbb2:2d0:8727:55f2) |
| 02:08:19 | × | tv quits (~tv@user/tv) (Read error: Connection reset by peer) |
| 02:09:24 | × | emmanuelux quits (~emmanuelu@user/emmanuelux) (Quit: au revoir) |
| 02:10:07 | × | grnman_ quits (~michaelsc@c-66-176-3-51.hsd1.fl.comcast.net) (Ping timeout: 250 seconds) |
| 02:14:53 | × | shapr quits (~user@2600:1700:c640:3100:8df1:aed4:1a6e:c7e2) (Ping timeout: 246 seconds) |
| 02:15:25 | → | nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
| 02:18:46 | × | td_ quits (~td@i53870920.versanet.de) (Ping timeout: 245 seconds) |
| 02:19:05 | × | todi quits (~todi@85.239.52.173) (Ping timeout: 246 seconds) |
| 02:20:34 | → | td_ joins (~td@i53870926.versanet.de) |
| 02:22:57 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 02:23:32 | <justsomeguy> | How can I list all running processes using Haskell? I don't see anything in base that fits the bill. Looking for a relevant package on hoogle now. |
| 02:24:27 | × | user2 quits (~user@162.255.84.96) (Server closed connection) |
| 02:24:49 | → | user2 joins (~user@162.255.84.96) |
| 02:25:11 | <probie> | justsomeguy: English is too ambiguous. Do you mean "How can I list (all running processes) using Haskell" or "How can I list all (running processes using Haskell)"? |
| 02:26:10 | <justsomeguy> | I don't understand. Basically I want to write a cli utility that, when run, lists the pid and argument list of all currently running processes on a Linux machine. |
| 02:26:32 | <EvanR> | you can call out to the ps command using System.Process |
| 02:27:12 | <justsomeguy> | I guess that's the most straight-forward way. Is there a library I can use to do this, instead? |
| 02:28:11 | <EvanR> | it's like a one liner to get the text output of ps |
| 02:28:15 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 02:28:37 | <EvanR> | since you just want to show that list... seems like you'd be done |
| 02:28:40 | <dolio> | It's pointless to write a Haskell utility that just calls ps, though. |
| 02:28:43 | <wroathe> | justsomeguy: Another way would be to parse through /proc |
| 02:28:54 | <probie> | Why run `ps` at all? Just look at folders with numeric names in `/proc` |
| 02:29:05 | <wroathe> | probie: jynx |
| 02:30:09 | <monochrom> | All existing Linux utilities for that just read from /proc. |
| 02:31:06 | <wroathe> | https://gist.github.com/JustinChristensen/0c1d994d6f350228e6b9ae8a64f252e4 <-- is there a way to avoid duplicating this instance? Like a way to do type equivalence that results in a Bool term? |
| 02:31:15 | <monochrom> | cmdline arguments are in /proc/N/cmdline |
| 02:31:52 | <EvanR> | I did the leg work of look at hackage for justsomeguy ! |
| 02:31:58 | <EvanR> | I'm an enabler https://hackage.haskell.org/package/system-linux-proc |
| 02:32:12 | → | finn_elija joins (~finn_elij@user/finn-elija/x-0085643) |
| 02:32:12 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija))) |
| 02:32:12 | finn_elija | is now known as FinnElija |
| 02:32:45 | <monochrom> | Perhaps there is an innate disbelief that it's /proc. I know because I was one of them. |
| 02:33:00 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 245 seconds) |
| 02:33:07 | <wroathe> | The more you dig into linux the more you realize that everything is driven by the fs |
| 02:33:12 | <wroathe> | Just accept it |
| 02:33:48 | <justsomeguy> | Thank you EvanR. I think that I'll have to learn more about Hoogle. I couldn't find anything when I searched. Maybe the key was adding "proc" to the keywords. |
| 02:34:03 | <EvanR> | hoogle is search by type signature right |
| 02:34:15 | <EvanR> | if you don't guess the type names used in the library you want, you're screwed |
| 02:34:26 | <EvanR> | hackage is the package repo |
| 02:34:35 | <justsomeguy> | monochrom: That's interesting. I think I'll spend some time learning how to explore /proc. (Which will mean learning basic file IO, too.) |
| 02:35:22 | <justsomeguy> | So, how did you guess the type signature, EvanR ? |
| 02:35:35 | <EvanR> | everything is nicely available in the filesystem, which has limited support for transactions. So by the time you finish sifting through /proc the landscape has changed on you in an unknown way! |
| 02:35:39 | → | razetime joins (~quassel@49.207.205.39) |
| 02:36:59 | <EvanR> | justsomeguy, didn't, I heard on hackage for `linux' |
| 02:37:06 | <EvanR> | I searched* |
| 02:37:32 | <probie> | listDirectory "/proc" >>= filterM (doesDirectoryExist . ("/proc/" <>)) . filter (all isDigit) >>= mapM_ (\proc -> putStr proc >> putChar '\t' >> (readFile ("/proc/" <> proc <> "/cmdline") >>= putStrLn)) |
| 02:37:59 | <EvanR> | ah perfectly idiomatic haskell |
| 02:38:36 | <probie> | It seems to work, apart from that there tend to be a bunch of processes an empty `cmdline` |
| 02:39:15 | <EvanR> | child processes spawned without typing a command? |
| 02:39:42 | <monochrom> | They just inherit the same cmdline. |
| 02:39:55 | → | grnman_ joins (~michaelsc@c-66-176-3-51.hsd1.fl.comcast.net) |
| 02:40:11 | <probie> | They seem to all be kworkers |
| 02:46:30 | <probie> | I was about to complain about the directory package using strings, but since I've lasted looked at it, they added `System.Directory.OsPath` |
| 02:47:24 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 02:48:40 | <monochrom> | :) |
| 02:52:30 | → | YuutaW joins (~YuutaW@2404:f4c0:f9c3:502::100:17b7) |
| 02:53:28 | <probie> | although, it seems like you have to import `System.Directory.Internal` to actually use it, since I can't find a way outside of that to turn a literal into an `OsPath` |
| 02:55:31 | <justsomeguy> | I just started putting together braindead-simple example programs and it's been really fun so far. Things like "how do I parse args", "how do I read a CSV and output the first two feilds", "how do I download a webpage using http". It's a good diversion from the book I'm working on. |
| 02:58:08 | → | machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net) |
| 02:58:33 | <justsomeguy> | It doesn't sound exciting, but I'm finding it more interesting that implementing ceasar cipher programs or reimplementing functions from Data.Maybe. |
| 02:59:26 | <ddellacosta> | I think anything that motivates you to keep programming and learning is great |
| 02:59:47 | → | sm joins (~sm@plaintextaccounting/sm) |
| 03:00:03 | × | sm quits (~sm@plaintextaccounting/sm) (Client Quit) |
| 03:10:09 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 255 seconds) |
| 03:10:36 | × | gabiruh quits (~gabiruh@191.252.222.55) (Ping timeout: 248 seconds) |
| 03:11:42 | → | gabiruh joins (~gabiruh@vps19177.publiccloud.com.br) |
| 03:13:23 | <[Leary]> | probie: Weird, looks like you have to depend directly on filepath. They should just reexport `encodeUtf` and `osstr`. |
| 03:18:42 | × | nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 255 seconds) |
| 03:18:45 | <EvanR> | justsomeguy, if you figure out graphics you can also make visualizations for your CSV files |
| 03:20:08 | <justsomeguy> | That sounds fun <3 |
| 03:20:48 | × | jero98772 quits (~jero98772@2800:484:1d84:300::2) (Remote host closed the connection) |
| 03:20:51 | → | Guest25 joins (~Guest25@124.253.109.13) |
| 03:22:03 | × | aforemny_ quits (~aforemny@i59F516FF.versanet.de) (Ping timeout: 246 seconds) |
| 03:22:07 | → | aforemny joins (~aforemny@i59F516DB.versanet.de) |
| 03:27:45 | → | robobub joins (uid248673@id-248673.uxbridge.irccloud.com) |
| 03:33:51 | × | Guest25 quits (~Guest25@124.253.109.13) (Quit: Client closed) |
| 03:35:16 | × | Me-me quits (~Me-me@user/me-me) (Quit: Something has gone terribly, terribly wrong, that being that I'm not here any more.) |
| 03:39:58 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 03:40:57 | × | kaol quits (~kaol@94-237-42-30.nl-ams1.upcloud.host) (Server closed connection) |
| 03:41:04 | → | kaol joins (~kaol@94-237-42-30.nl-ams1.upcloud.host) |
| 03:42:06 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 255 seconds) |
| 03:47:47 | × | machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 246 seconds) |
| 03:56:05 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
| 03:57:32 | × | ddellacosta quits (~ddellacos@ool-44c738de.dyn.optonline.net) (Ping timeout: 248 seconds) |
| 03:58:12 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 244 seconds) |
| 03:59:25 | → | ddellacosta joins (~ddellacos@ool-44c738de.dyn.optonline.net) |
| 04:02:27 | → | billchenchina joins (~billchenc@103.152.35.21) |
| 04:06:53 | × | xff0x quits (~xff0x@2405:6580:b080:900:f9db:5513:e0b6:cbdd) (Ping timeout: 246 seconds) |
| 04:07:16 | → | xff0x joins (~xff0x@178.255.149.135) |
| 04:11:39 | × | Unicorn_Princess quits (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection) |
| 04:15:59 | → | mud joins (~mud@user/kadoban) |
| 04:19:41 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 04:20:54 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 04:24:44 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 246 seconds) |
| 04:25:58 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 255 seconds) |
| 04:26:39 | × | xff0x quits (~xff0x@178.255.149.135) (Ping timeout: 255 seconds) |
| 04:28:31 | → | xff0x joins (~xff0x@2405:6580:b080:900:5a86:3c66:d876:96c3) |
| 04:31:22 | × | mud quits (~mud@user/kadoban) (Ping timeout: 255 seconds) |
| 04:33:28 | → | mud joins (~mud@user/kadoban) |
| 04:34:39 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 04:43:28 | → | kadobanana joins (~mud@user/kadoban) |
| 04:44:04 | × | mud quits (~mud@user/kadoban) (Read error: Connection reset by peer) |
| 04:47:20 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 04:52:44 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 246 seconds) |
| 04:54:24 | → | Jackneill_ joins (~Jackneill@20014C4E1E04F900B232957EB116ACCE.dsl.pool.telekom.hu) |
| 04:56:58 | → | mud joins (~mud@user/kadoban) |
| 04:57:25 | × | kadobanana quits (~mud@user/kadoban) (Read error: Connection reset by peer) |
| 04:59:30 | × | grnman_ quits (~michaelsc@c-66-176-3-51.hsd1.fl.comcast.net) (Ping timeout: 255 seconds) |
| 05:00:40 | → | mhatta joins (~mhatta@www21123ui.sakura.ne.jp) |
| 05:01:18 | → | kadobanana joins (~mud@user/kadoban) |
| 05:01:35 | × | mud quits (~mud@user/kadoban) (Read error: Connection reset by peer) |
| 05:02:23 | → | acidjnk joins (~acidjnk@p200300d6e7072f47394156b098f09540.dip0.t-ipconnect.de) |
| 05:02:32 | × | connrs quits (~connrs@user/connrs) (Quit: ZNC 1.8.2 - https://znc.in) |
| 05:02:48 | → | connrs joins (~connrs@user/connrs) |
| 05:10:16 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 05:11:38 | × | razetime quits (~quassel@49.207.205.39) (Ping timeout: 246 seconds) |
| 05:14:58 | × | kadobanana quits (~mud@user/kadoban) (Read error: Connection reset by peer) |
| 05:15:17 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 246 seconds) |
| 05:15:19 | → | kadobanana joins (~mud@user/kadoban) |
| 05:16:14 | → | nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
| 05:19:43 | × | mysl quits (~mysl@user/mysl) (Ping timeout: 258 seconds) |
| 05:20:32 | × | caryhartline quits (~caryhartl@168.182.58.169) (Quit: caryhartline) |
| 05:20:44 | × | nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 246 seconds) |
| 05:21:09 | → | mud joins (~mud@user/kadoban) |
| 05:22:13 | × | kadobanana quits (~mud@user/kadoban) (Ping timeout: 255 seconds) |
| 05:26:10 | × | mud quits (~mud@user/kadoban) (Read error: Connection reset by peer) |
| 05:26:30 | → | mud joins (~mud@user/kadoban) |
| 05:26:59 | × | mud quits (~mud@user/kadoban) (Client Quit) |
| 05:34:32 | → | razetime joins (~quassel@49.207.205.39) |
| 05:35:13 | × | robobub quits (uid248673@id-248673.uxbridge.irccloud.com) (Quit: Connection closed for inactivity) |
| 05:40:31 | × | zer0bitz_ quits (~zer0bitz@user/zer0bitz) (Ping timeout: 246 seconds) |
| 05:42:41 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 05:49:45 | → | zer0bitz joins (~zer0bitz@user/zer0bitz) |
| 05:54:27 | × | Jackneill_ quits (~Jackneill@20014C4E1E04F900B232957EB116ACCE.dsl.pool.telekom.hu) (Ping timeout: 244 seconds) |
| 05:55:32 | × | NinjaTrappeur quits (~ninja@user/ninjatrappeur) (Server closed connection) |
| 05:55:58 | → | NinjaTrappeur joins (~ninja@user/ninjatrappeur) |
| 05:59:56 | → | caryhartline joins (~caryhartl@168.182.58.169) |
| 06:00:59 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 246 seconds) |
| 06:06:17 | × | razetime quits (~quassel@49.207.205.39) (Ping timeout: 250 seconds) |
| 06:06:45 | × | caryhartline quits (~caryhartl@168.182.58.169) (Quit: caryhartline) |
| 06:07:42 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 06:07:51 | → | jespada joins (~jespada@cpc121308-nmal25-2-0-cust15.19-2.cable.virginm.net) |
| 06:08:43 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 06:14:04 | → | razetime joins (~quassel@49.207.205.39) |
| 06:16:52 | → | mima joins (~mmh@net-93-67-197-209.cust.vodafonedsl.it) |
| 06:18:34 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 06:23:37 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 250 seconds) |
| 06:27:27 | × | whatsupdoc quits (uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
| 06:27:35 | × | razetime quits (~quassel@49.207.205.39) (Ping timeout: 246 seconds) |
| 06:36:47 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 06:39:27 | <phma> | I run my program on an 8-byte file, using "stack run", and it produces 0 bytes of output. |
| 06:40:45 | <phma> | I run «encryptFile "keyκλειςמפתחключ" "temp858575.8.orig" "temp858575.8.he"» inside "stack ghci" (temp858575.8.orig being the 8-byte file) and I get 8 bytes of output. |
| 06:41:16 | <phma> | I run it with "stack run" on an 8 MiB file, and I get 8 MiB of output. How come? |
| 06:41:50 | × | mjt128 quits (~user@2604:3d09:3e79:f200:d96:cc3f:e5f6:21af) (Remote host closed the connection) |
| 06:42:19 | <phma> | Here's the source: https://github.com/phma/wring-twistree/blob/master/app/Main.hs |
| 06:42:41 | <phma> | Lazy I/O, I guess. |
| 06:43:21 | <mauke> | if (length actions == 1) then Just (head actions) else Nothing should be replaced by pattern matching |
| 06:50:43 | <phma> | That's not the problem. It produced a file, so it called encryptFile. But it produced an empty file. |
| 06:51:21 | <mauke> | yeah, I just skimmed it because it was too much code |
| 06:51:24 | <mauke> | but that stuck out to me |
| 06:52:55 | <phma> | I had a previous version that wrote the file differently; I gave it a 17025-byte file and it output a 16084-byte file, or something like that. |
| 06:53:08 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 246 seconds) |
| 06:53:28 | <phma> | I fixed that by outputting a strict ByteString. Takes more memory at the end, but it writes the whole file. |
| 06:54:05 | → | mysl joins (~mysl@user/mysl) |
| 06:54:46 | <phma> | I'm wondering if, when run from "stack run", it closes the input file before reading anything. |
| 06:55:20 | <mauke> | have you done any debugging? |
| 06:56:32 | <phma> | how do I debug it when using stack? I've tried the ghci debugger on another program, long time ago. |
| 06:56:53 | → | jmdaemon joins (~jmdaemon@user/jmdaemon) |
| 06:57:08 | <mauke> | remove all parts of the code that don't contribute to the problem |
| 06:57:11 | <mauke> | hardcode inputs, etc |
| 06:58:00 | <int-e> | IIUC you should close the handle so that buffers are flushed. |
| 06:58:44 | <phma> | how do I make sure that the whole data structure is output before I close the handle? |
| 06:59:32 | <int-e> | hClose will take care of that. |
| 07:00:02 | <phma> | do I put that in writeFileArray? |
| 07:00:20 | <int-e> | Yes, after the hPut. |
| 07:00:57 | <phma> | do I have to put it in the readFile functions too? |
| 07:01:36 | × | ursa-major quits (~ursa-majo@37.19.210.23) (Ping timeout: 260 seconds) |
| 07:01:48 | <int-e> | You don't have to. With lazy IO it would even be harmful. |
| 07:01:55 | <phma> | it is possible (though not in the current shell script) that the output file is the same as the input file |
| 07:02:15 | <int-e> | If you want to allow that you better close the handle after reading. |
| 07:02:15 | <phma> | ok I'll try that |
| 07:02:53 | <int-e> | (You're not currently using lazy IO so closing is fine.) |
| 07:03:00 | <mauke> | hGetContents closes the handle |
| 07:03:05 | <phma> | the file is read eagerly when encrypting, it will be read lazily when hashing |
| 07:03:13 | <int-e> | Oh right. |
| 07:04:02 | <mauke> | consider writing to a tmp file and renaming it to the target on success |
| 07:05:14 | <phma> | all files are 8 bytes now |
| 07:05:26 | <int-e> | I'm not sure I fully understand this... I *believe* the footgun here is that buffers of open handles are flushed in a finalizer. So in a lot of cases, your file will be written fully even if you don't close it; all you have to do is trigger a garbage collection. However, terminating the program does not do a final GC. |
| 07:06:01 | <phma> | now I have to fix a bug in the Rust program where it crashes reading an empty file |
| 07:06:47 | × | apteryx quits (~maxim@dsl-154-228.b2b2c.ca) (Ping timeout: 244 seconds) |
| 07:07:27 | <int-e> | In particular, ghci will quickly GC once you reach the prompt (at which point the process will be idle) and that will write the file fully at that point... so that'll be why it seems to work in ghci. |
| 07:08:09 | <phma> | Ah! |
| 07:09:48 | → | sm joins (~sm@plaintextaccounting/sm) |
| 07:18:06 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 246 seconds) |
| 07:18:49 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 07:18:52 | → | Simikando joins (~Simikando@adsl-dyn91.91-127-22.t-com.sk) |
| 07:20:40 | → | apteryx joins (~maxim@dsl-10-135-141.b2b2c.ca) |
| 07:21:47 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 07:21:48 | × | mysl quits (~mysl@user/mysl) (Read error: Connection reset by peer) |
| 07:24:17 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:e816:d59f:5dd6:1363) (Remote host closed the connection) |
| 07:26:18 | → | mysl joins (~mysl@user/mysl) |
| 07:26:52 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 255 seconds) |
| 07:27:28 | → | ursa-major joins (~ursa-majo@static-198-44-128-182.cust.tzulo.com) |
| 07:28:12 | × | ursa-major quits (~ursa-majo@static-198-44-128-182.cust.tzulo.com) (Client Quit) |
| 07:29:04 | × | billchenchina quits (~billchenc@103.152.35.21) (Remote host closed the connection) |
| 07:29:15 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 245 seconds) |
| 07:29:26 | → | todi joins (~todi@p4fd1a580.dip0.t-ipconnect.de) |
| 07:33:07 | → | fendor joins (~fendor@2a02:8388:1640:be00:c785:45ab:c70:9d3f) |
| 07:39:20 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 07:43:35 | → | billchenchina joins (~billchenc@2a0c:b641:7a2:320:ee3e:47ca:6070:d71a) |
| 07:45:55 | → | razetime joins (~quassel@49.207.205.39) |
| 07:54:00 | × | haskellbridge quits (~haskellbr@069-135-003-034.biz.spectrum.com) (Ping timeout: 246 seconds) |
| 07:54:36 | → | allbery_b joins (~geekosaur@xmonad/geekosaur) |
| 07:54:41 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Ping timeout: 260 seconds) |
| 07:54:44 | × | Simikando quits (~Simikando@adsl-dyn91.91-127-22.t-com.sk) (Ping timeout: 246 seconds) |
| 07:54:50 | → | haskellbridge joins (~haskellbr@069-135-003-034.biz.spectrum.com) |
| 07:56:17 | allbery_b | is now known as geekosaur |
| 07:57:13 | → | Tuplanolla joins (~Tuplanoll@91-159-68-236.elisa-laajakaista.fi) |
| 07:58:36 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 255 seconds) |
| 08:02:02 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:2dac:1dc7:bdec:1908) |
| 08:04:55 | → | Simikando joins (~Simikando@adsl-dyn91.91-127-22.t-com.sk) |
| 08:06:07 | → | machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net) |
| 08:08:42 | × | lottaquestions_ quits (~nick@2607:fa49:503d:b200:d5e6:66af:52b4:3a41) (Server closed connection) |
| 08:09:10 | → | lottaquestions_ joins (~nick@2607:fa49:503d:b200:4f8:d092:c79f:e0d6) |
| 08:10:07 | × | pieguy128 quits (~pieguy128@bras-base-mtrlpq5031w-grc-46-67-70-100-114.dsl.bell.ca) (Server closed connection) |
| 08:10:27 | → | pieguy128 joins (~pieguy128@bras-base-mtrlpq5031w-grc-46-67-70-100-114.dsl.bell.ca) |
| 08:13:21 | → | oo_miguel joins (~Thunderbi@78-11-179-96.static.ip.netia.com.pl) |
| 08:21:52 | → | _ht joins (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) |
| 08:26:05 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 08:29:10 | × | econo_ quits (uid147250@id-147250.tinside.irccloud.com) (Quit: Connection closed for inactivity) |
| 08:31:18 | → | merijn joins (~merijn@088-129-128-083.dynamic.caiway.nl) |
| 08:35:41 | × | merijn quits (~merijn@088-129-128-083.dynamic.caiway.nl) (Ping timeout: 246 seconds) |
| 08:43:20 | → | tv joins (~tv@user/tv) |
| 08:43:53 | × | billchenchina quits (~billchenc@2a0c:b641:7a2:320:ee3e:47ca:6070:d71a) (Remote host closed the connection) |
| 08:45:22 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 245 seconds) |
| 08:46:46 | × | Simikando quits (~Simikando@adsl-dyn91.91-127-22.t-com.sk) (Remote host closed the connection) |
| 08:47:09 | → | Simikando joins (~Simikando@adsl-dyn91.91-127-22.t-com.sk) |
| 08:47:42 | × | Simikando quits (~Simikando@adsl-dyn91.91-127-22.t-com.sk) (Remote host closed the connection) |
| 08:48:09 | → | Simikando joins (~Simikando@adsl-dyn91.91-127-22.t-com.sk) |
| 08:49:39 | × | Fischmiep quits (~Fischmiep@user/Fischmiep) (Quit: ZNC - https://znc.in) |
| 09:00:50 | × | sm quits (~sm@plaintextaccounting/sm) (Quit: sm) |
| 09:02:01 | → | arahael joins (~arahael@119.18.1.27) |
| 09:07:00 | × | arahael quits (~arahael@119.18.1.27) (Ping timeout: 255 seconds) |
| 09:11:18 | × | mima quits (~mmh@net-93-67-197-209.cust.vodafonedsl.it) (Ping timeout: 244 seconds) |
| 09:12:51 | × | Simikando quits (~Simikando@adsl-dyn91.91-127-22.t-com.sk) (Ping timeout: 255 seconds) |
| 09:14:31 | → | coot joins (~coot@89-69-206-216.dynamic.chello.pl) |
| 09:17:10 | → | nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
| 09:19:02 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz) |
| 09:20:16 | × | machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 255 seconds) |
| 09:22:35 | × | nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 250 seconds) |
| 09:30:11 | × | ezzieyguywuf quits (~Unknown@user/ezzieyguywuf) (Ping timeout: 246 seconds) |
| 09:31:55 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 09:37:02 | → | ezzieyguywuf joins (~Unknown@user/ezzieyguywuf) |
| 09:37:54 | → | notzmv joins (~zmv@user/notzmv) |
| 09:41:52 | × | Vajb quits (~Vajb@85-76-5-175-nat.elisa-mobile.fi) (Ping timeout: 255 seconds) |
| 09:50:01 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 245 seconds) |
| 09:52:19 | → | lex_ joins (~alex@188.26.233.194) |
| 09:54:56 | × | haskellbridge quits (~haskellbr@069-135-003-034.biz.spectrum.com) (Ping timeout: 246 seconds) |
| 09:55:17 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Ping timeout: 246 seconds) |
| 10:00:26 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 10:00:46 | → | haskellbridge joins (~haskellbr@069-135-003-034.biz.spectrum.com) |
| 10:04:50 | → | azimut_ joins (~azimut@gateway/tor-sasl/azimut) |
| 10:07:09 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 246 seconds) |
| 10:09:39 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 10:14:40 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 245 seconds) |
| 10:16:54 | → | Fischmiep joins (~Fischmiep@user/Fischmiep) |
| 10:20:03 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 10:26:22 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 10:27:20 | × | hdggxin_ quits (~hdggxin@122.175.41.19) (Ping timeout: 246 seconds) |
| 10:30:19 | × | fserucas__ quits (~fserucas@89.214.152.246) (Ping timeout: 246 seconds) |
| 10:31:11 | × | razetime quits (~quassel@49.207.205.39) (Ping timeout: 245 seconds) |
| 10:33:59 | × | lex_ quits (~alex@188.26.233.194) (Ping timeout: 246 seconds) |
| 10:40:27 | × | chiselfuse quits (~chiselfus@user/chiselfuse) (Remote host closed the connection) |
| 10:41:04 | → | chiselfuse joins (~chiselfus@user/chiselfuse) |
| 10:45:20 | → | mmhat joins (~mmh@p200300f1c7414423ee086bfffe095315.dip0.t-ipconnect.de) |
| 10:45:21 | × | mmhat quits (~mmh@p200300f1c7414423ee086bfffe095315.dip0.t-ipconnect.de) (Client Quit) |
| 10:45:49 | → | razetime joins (~quassel@49.207.205.39) |
| 10:47:09 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 248 seconds) |
| 10:54:30 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 11:01:04 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 255 seconds) |
| 11:01:13 | × | mrmr1 quits (~mrmr@user/mrmr) (Quit: Bye, See ya later!) |
| 11:02:19 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 11:02:58 | → | libertyprime joins (~libertypr@203.96.203.44) |
| 11:06:11 | → | mrmr1 joins (~mrmr@user/mrmr) |
| 11:07:27 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 250 seconds) |
| 11:13:49 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 11:16:22 | × | rachelambda quits (~rachelamb@78-67-128-99-no247.tbcn.telia.com) (Ping timeout: 255 seconds) |
| 11:18:51 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 255 seconds) |
| 11:19:49 | → | rachelambda joins (~rachelamb@78-67-128-99-no247.tbcn.telia.com) |
| 11:20:20 | × | ezzieyguywuf quits (~Unknown@user/ezzieyguywuf) (Ping timeout: 246 seconds) |
| 11:21:22 | × | shailangsa_ quits (~shailangs@host86-186-196-224.range86-186.btcentralplus.com) (Server closed connection) |
| 11:22:19 | → | ezzieyguywuf joins (~Unknown@user/ezzieyguywuf) |
| 11:22:49 | × | rachelambda quits (~rachelamb@78-67-128-99-no247.tbcn.telia.com) (Client Quit) |
| 11:23:06 | × | razetime quits (~quassel@49.207.205.39) (Remote host closed the connection) |
| 11:23:10 | → | rachelambda joins (~rachelamb@78-67-128-99-no247.tbcn.telia.com) |
| 11:25:33 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 11:29:15 | → | __monty__ joins (~toonn@user/toonn) |
| 11:36:04 | × | qqq quits (~qqq@92.43.167.61) (Remote host closed the connection) |
| 11:40:19 | × | darkling quits (~darkling@2001-ba8-1f1-f0e6-0-0-0-2.autov6rev.bitfolk.space) (Remote host closed the connection) |
| 11:40:23 | × | df quits (~ben@justworks.xyz) (Ping timeout: 250 seconds) |
| 11:40:37 | → | df joins (~ben@justworks.xyz) |
| 11:40:38 | → | darkling joins (~darkling@savella.carfax.org.uk) |
| 11:42:01 | × | libertyprime quits (~libertypr@203.96.203.44) (Ping timeout: 255 seconds) |
| 11:42:35 | × | mechap quits (~mechap@user/mechap) (Ping timeout: 246 seconds) |
| 11:43:41 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 245 seconds) |
| 11:43:49 | → | mechap joins (~mechap@user/mechap) |
| 11:53:21 | → | Simikando joins (~Simikando@adsl-dyn91.91-127-22.t-com.sk) |
| 12:01:32 | → | Vajb joins (~Vajb@85-76-2-15-nat.elisa-mobile.fi) |
| 12:03:16 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 12:04:18 | → | shailangsa joins (~shailangs@host86-186-196-224.range86-186.btcentralplus.com) |
| 12:08:00 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 245 seconds) |
| 12:11:58 | → | mima joins (~mmh@net-93-67-197-209.cust.vodafonedsl.it) |
| 12:14:46 | × | mechap quits (~mechap@user/mechap) (Quit: WeeChat 4.0.4) |
| 12:15:10 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 12:17:07 | × | Simikando quits (~Simikando@adsl-dyn91.91-127-22.t-com.sk) (Ping timeout: 255 seconds) |
| 12:17:14 | × | infinity0 quits (~infinity0@pwned.gg) (Ping timeout: 246 seconds) |
| 12:17:52 | × | ezzieyguywuf quits (~Unknown@user/ezzieyguywuf) (Ping timeout: 245 seconds) |
| 12:19:52 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 12:24:04 | × | yushyin quits (lalptp8DQk@mail.karif.server-speed.net) (Quit: WeeChat 3.8) |
| 12:24:04 | × | noctux1 quits (88FTKVRINY@user/noctux) (Quit: WeeChat 3.7.1) |
| 12:24:05 | × | s4msung quits (cDjJALwvGU@user/s4msung) (Quit: s4msung) |
| 12:24:33 | → | noctuks joins (8da8AZSHaf@user/noctux) |
| 12:24:35 | → | s4msung joins (0RQA7T2IW8@user/s4msung) |
| 12:24:35 | → | yushyin joins (QIgO0IDFsU@mail.karif.server-speed.net) |
| 12:24:40 | → | qqq joins (~qqq@92.43.167.61) |
| 12:24:50 | → | ezzieyguywuf joins (~Unknown@user/ezzieyguywuf) |
| 12:28:05 | → | paulpaul1076 joins (~textual@157.97.121.11) |
| 12:28:53 | → | waleee joins (~waleee@2001:9b0:21c:4000:5bf9:6515:c030:57b7) |
| 12:29:21 | → | lisbeths joins (uid135845@id-135845.lymington.irccloud.com) |
| 12:33:19 | × | artem quits (~artem@c-73-103-90-145.hsd1.in.comcast.net) (Read error: Connection reset by peer) |
| 12:33:28 | → | ulysses4ever joins (~artem@2601:249:4380:8950:f474:e3f8:9806:671) |
| 12:35:41 | → | Lycurgus joins (~juan@user/Lycurgus) |
| 12:36:43 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 12:39:17 | × | gawen_ quits (~gawen@user/gawen) (Server closed connection) |
| 12:40:20 | → | gawen joins (~gawen@user/gawen) |
| 12:46:52 | → | nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
| 12:52:27 | × | nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 255 seconds) |
| 12:55:30 | × | mima quits (~mmh@net-93-67-197-209.cust.vodafonedsl.it) (Ping timeout: 258 seconds) |
| 12:55:40 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 248 seconds) |
| 12:55:44 | × | paulpaul1076 quits (~textual@157.97.121.11) (Ping timeout: 246 seconds) |
| 12:59:13 | → | mikoto-chan joins (~mikoto-ch@ip-83-134-209-157.dsl.scarlet.be) |
| 13:00:10 | → | grnman_ joins (~michaelsc@c-66-176-3-51.hsd1.fl.comcast.net) |
| 13:09:41 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 13:25:14 | → | bitdex_ joins (~bitdex@gateway/tor-sasl/bitdex) |
| 13:25:51 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 245 seconds) |
| 13:27:42 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 246 seconds) |
| 13:43:34 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 13:50:20 | × | Lycurgus quits (~juan@user/Lycurgus) (Quit: Tschüss) |
| 13:57:20 | × | mysl quits (~mysl@user/mysl) (Ping timeout: 246 seconds) |
| 13:57:41 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 246 seconds) |
| 13:57:44 | <erisco> | side effect on free, yikes |
| 13:58:01 | → | mysl joins (~mysl@user/mysl) |
| 14:03:17 | × | grnman_ quits (~michaelsc@c-66-176-3-51.hsd1.fl.comcast.net) (Ping timeout: 246 seconds) |
| 14:06:35 | × | Fischmiep quits (~Fischmiep@user/Fischmiep) (Quit: ZNC - https://znc.in) |
| 14:08:37 | → | Fischmiep joins (~Fischmiep@user/Fischmiep) |
| 14:16:01 | → | wroathe joins (~wroathe@user/wroathe) |
| 14:19:13 | × | acidjnk quits (~acidjnk@p200300d6e7072f47394156b098f09540.dip0.t-ipconnect.de) (Ping timeout: 246 seconds) |
| 14:23:24 | × | p3n quits (~p3n@2a00:19a0:3:7c:0:d9c6:7cf6:1) (Quit: ZNC 1.8.2 - https://znc.in) |
| 14:25:21 | → | p3n joins (~p3n@217.198.124.246) |
| 14:26:17 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 14:27:54 | → | sm joins (~sm@plaintextaccounting/sm) |
| 14:28:18 | × | sm quits (~sm@plaintextaccounting/sm) (Remote host closed the connection) |
| 14:28:22 | × | masterbu1lder quits (~masterbui@user/masterbuilder) (Server closed connection) |
| 14:28:38 | → | masterbuilder joins (~masterbui@user/masterbuilder) |
| 14:28:56 | → | sm joins (~sm@plaintextaccounting/sm) |
| 14:38:28 | × | hgolden__ quits (~hgolden@2603-8000-9d00-3ed1-fc05-5499-f77c-fbe5.res6.spectrum.com) (Quit: Leaving) |
| 14:39:09 | → | hgolden joins (~hgolden@2603-8000-9d00-3ed1-fc05-5499-f77c-fbe5.res6.spectrum.com) |
| 14:45:51 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 255 seconds) |
| 14:46:30 | × | lisbeths quits (uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 14:49:41 | → | Jackneill_ joins (~Jackneill@20014C4E1E04F9003F4C923B253B51CB.dsl.pool.telekom.hu) |
| 14:58:23 | × | zer0bitz quits (~zer0bitz@user/zer0bitz) () |
| 14:59:50 | → | jinsun_ joins (~jinsun@user/jinsun) |
| 14:59:50 | × | jinsun quits (~jinsun@user/jinsun) (Killed (mercury.libera.chat (Nickname regained by services))) |
| 14:59:50 | jinsun_ | is now known as jinsun |
| 15:04:24 | → | acidjnk joins (~acidjnk@p200300d6e7072f47410f32a7f56ccb8a.dip0.t-ipconnect.de) |
| 15:11:03 | → | grnman_ joins (~michaelsc@c-66-176-3-51.hsd1.fl.comcast.net) |
| 15:14:06 | × | azimut_ quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 246 seconds) |
| 15:15:54 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 15:19:28 | → | Simikando joins (~Simikando@adsl-dyn91.91-127-22.t-com.sk) |
| 15:20:57 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 255 seconds) |
| 15:21:51 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 255 seconds) |
| 15:25:04 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 15:26:54 | × | sm quits (~sm@plaintextaccounting/sm) (Quit: sm) |
| 15:27:35 | → | wroathe joins (~wroathe@user/wroathe) |
| 15:30:35 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 15:31:45 | × | Simikando quits (~Simikando@adsl-dyn91.91-127-22.t-com.sk) (Ping timeout: 255 seconds) |
| 15:33:33 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 15:40:44 | → | Simikando joins (~Simikando@adsl-dyn91.91-127-22.t-com.sk) |
| 15:43:34 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.6) |
| 15:43:54 | × | dxtr quits (~dxtr@user/dxtr) (Quit: leaving) |
| 15:45:27 | <wroathe> | Are instances the only option for modeling a kind of "type-level" case statement or equality in Haskell? |
| 15:45:55 | <[exa]> | "instances" ? |
| 15:46:28 | <davean> | I think they mean class instances |
| 15:46:45 | <wroathe> | Right, yeah |
| 15:46:59 | <wroathe> | s/ / / |
| 15:47:11 | <[exa]> | anyway if I get it right, you need some kind of evaluation and case matching in types, for which you need something that actually computes on types, and these things are currently either typeclass instances or type families, so basically yeah |
| 15:47:33 | <davean> | Yah type families ... I think they're better |
| 15:47:35 | <wroathe> | [exa]: Got it. Yup, you understood right. |
| 15:47:42 | <[exa]> | at least I'm not aware of anything else in mainstream |
| 15:47:45 | <davean> | (for that use) |
| 15:48:10 | <davean> | Hum, can you do it enoug via GADT combinators? |
| 15:48:29 | <wroathe> | Here's a simple example, but say I wanted to do equality here on "c" instead of requiring a whole separate instance to match PrimaryKey: https://gist.github.com/JustinChristensen/0c1d994d6f350228e6b9ae8a64f252e4 |
| 15:48:29 | <davean> | depends on what wroathe wants I tihnk |
| 15:48:50 | <EvanR> | type level equality could be construed to be a ~ b constraint |
| 15:48:55 | <erisco> | wroathe, classes map types to terms. If you wanted just type-level, a type family is more accurate |
| 15:48:56 | <[exa]> | davean: might work but not sure |
| 15:49:31 | × | juri_ quits (~juri@84-19-175-187.pool.ovpn.com) (Ping timeout: 260 seconds) |
| 15:49:36 | <wroathe> | Essentially what I want here is a way to express primaryKey = toBoolTerm (c == PrimaryKey) where == is defined at the type level |
| 15:49:36 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 245 seconds) |
| 15:50:12 | <EvanR> | c ~ PrimaryKey ? |
| 15:50:30 | <EvanR> | oh, equality bool test... |
| 15:51:00 | <EvanR> | that seems like a suspicious way to go |
| 15:51:09 | <wroathe> | Yeah, I suppose c == PrimaryKey would have to evaluate to a kind of 'Bool, and then I'd have to go from 'Bool to Bool |
| 15:51:13 | → | tabemann_ joins (~tabemann@2600:1700:7990:24e0:6810:41fc:2076:6808) |
| 15:51:38 | <EvanR> | bool tests usually means you're saying something roundabout and imprecise, and should just program the logic you want directly |
| 15:51:41 | <[exa]> | wroathe: with typeclasses you would probably like an "open" instance here for class ToBoolTerm -- like, one for `ToBoolTerm PrimaryKey` and one for `ToBoolTerm everythingElse` |
| 15:52:19 | <[exa]> | wroathe: if that's the case, tyfams are kinda more able to make this work without regrets |
| 15:52:35 | × | tabemann quits (~tabemann@2600:1700:7990:24e0:99bc:c1db:f913:fbcd) (Ping timeout: 245 seconds) |
| 15:52:51 | <wroathe> | [exa]: Yeah that first thing you said is essentially what I landed on when I asked about matching using instances. I can model this all day long with typeclasses and instances |
| 15:53:09 | <wroathe> | I need to read up more on type families. I'm guessing you're suggesting data families and not type synonym families? |
| 15:53:20 | <[exa]> | there's a super useful page on that topic somewhere which I can't find right now |
| 15:53:40 | <[exa]> | re all kinds of "families" -- not a big deal, it's mostly ergonomics |
| 15:53:57 | <[Leary]> | wroathe: You might want to read https://lexi-lambda.github.io/blog/2021/03/25/an-introduction-to-typeclass-metaprogramming/ |
| 15:54:14 | <[Leary]> | (which also goes into type families and GADTs) |
| 15:54:17 | <wroathe> | [Leary]: Thanks |
| 15:54:36 | <davean> | wroathe: why do you want this? |
| 15:55:12 | <wroathe> | davean: Because I'm building a Haskell type to SQL code generator for fun, and also using it as a learning opportunity |
| 15:55:58 | <davean> | Hum, your code looks like singletons and reflection too |
| 15:56:01 | <wroathe> | All for the most part being driven by phantom type parameters and typeclasses that traverse the type with GHC.Generics |
| 15:56:03 | <[exa]> | wroathe: btw https://aphyr.com/posts/342-typing-the-technical-interview -- this is a classic |
| 15:57:04 | <[exa]> | wroathe: the other article was on "open" vs "closed" tyfams and classes and I can't find it right now... but a bit of google should help too |
| 15:57:12 | <wroathe> | [exa]: I'll take a look, thanks |
| 15:57:40 | <[exa]> | with "haskell type to SQL" you might actually like Generic |
| 15:57:50 | <wroathe> | Yup, that's what I'm using |
| 15:57:55 | <[exa]> | ok good. :] |
| 15:58:05 | <[exa]> | well, good luck then. :D |
| 15:58:11 | <wroathe> | ty ty |
| 16:00:19 | → | sm joins (~sm@plaintextaccounting/sm) |
| 16:01:39 | × | qqq quits (~qqq@92.43.167.61) (Remote host closed the connection) |
| 16:01:46 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 16:03:19 | → | falafel joins (~falafel@62.175.113.194.dyn.user.ono.com) |
| 16:03:45 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 16:06:17 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:2dac:1dc7:bdec:1908) (Remote host closed the connection) |
| 16:06:33 | → | eggplantade joins (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) |
| 16:07:21 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 16:11:29 | → | econo_ joins (uid147250@id-147250.tinside.irccloud.com) |
| 16:11:48 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 255 seconds) |
| 16:12:34 | → | machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net) |
| 16:13:17 | → | Lycurgus joins (~juan@user/Lycurgus) |
| 16:16:27 | → | califax joins (~califax@user/califx) |
| 16:16:29 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 16:20:39 | × | machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 244 seconds) |
| 16:20:51 | × | sm quits (~sm@plaintextaccounting/sm) (Quit: sm) |
| 16:21:16 | × | Simikando quits (~Simikando@adsl-dyn91.91-127-22.t-com.sk) (Ping timeout: 245 seconds) |
| 16:22:12 | → | califax joins (~califax@user/califx) |
| 16:24:24 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 16:27:23 | → | califax joins (~califax@user/califx) |
| 16:29:38 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net) |
| 16:29:47 | <erisco> | Is blaze still the premier way to generate HTML with Haskell? I am thinking of doing some static site generation |
| 16:31:42 | <mzg> | What about hakyll? |
| 16:32:32 | <erisco> | I have used it and it was complicated |
| 16:33:48 | × | grnman_ quits (~michaelsc@c-66-176-3-51.hsd1.fl.comcast.net) (Ping timeout: 248 seconds) |
| 16:35:30 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 16:36:00 | → | danza joins (~francesco@151.47.125.64) |
| 16:36:45 | × | eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 16:38:15 | <wroathe> | [Leary]: I made it through the first section and part of the second, and it answered most of the questions I've been asking about this. Excellent read. My big takeaway is that the mechanism that haskell offers to from types to terms is typeclasses, but I can express functions on types with type synonym families, and that let's me define type-level predicates that map types to 'True and 'False, and then |
| 16:38:22 | <wroathe> | I'm just a typeclass away from getting True and False |
| 16:38:29 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:2dac:1dc7:bdec:1908) |
| 16:40:36 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 255 seconds) |
| 16:45:19 | × | haskellbridge quits (~haskellbr@069-135-003-034.biz.spectrum.com) (Remote host closed the connection) |
| 16:45:20 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Read error: Connection reset by peer) |
| 16:45:37 | × | Lycurgus quits (~juan@user/Lycurgus) (Quit: Tschüss) |
| 16:46:50 | → | Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542) |
| 16:48:27 | <wroathe> | Hmm, I count 11 language extensions in this code generator module I've got... |
| 16:48:38 | → | nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
| 16:48:43 | <wroathe> | Kinda seems like we're due for a Haskell 2020 |
| 16:48:54 | <int-e> | But, there are so many more! You're missing out! |
| 16:49:10 | <wroathe> | int-e: {-# LANGUAGE * #-} |
| 16:49:22 | <erisco> | As far as I can tell, a static page may as well be a Haskell program that outputs the page. You can use any build system to build the site (Shake is a fine choice) |
| 16:49:34 | int-e | stumbled across "CUSKs" yesterday only to find out that they're already deprecated. |
| 16:49:39 | <int-e> | That was fun. |
| 16:50:40 | <int-e> | (I didn't need them, I just saw them while tab-expanding :set -XNo... and I had no clue what CUSKs are. https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/poly_kinds.html?highlight=cusk#extension-CUSKs for the morbidly curious) |
| 16:51:32 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 16:51:35 | <wroathe> | Hmm, kind of seems like KnownBool should be a thing in TypeLits |
| 16:52:25 | → | Simikando joins (~Simikando@adsl-dyn91.91-127-22.t-com.sk) |
| 16:53:50 | × | nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 245 seconds) |
| 16:55:05 | → | haskellbridge joins (~haskellbr@069-135-003-034.biz.spectrum.com) |
| 16:55:51 | → | juri_ joins (~juri@84-19-175-187.pool.ovpn.com) |
| 16:56:37 | <dolio> | Maybe you should try GHC2021 instead of Haskell2010 or whatever. |
| 16:58:43 | <wroathe> | Oh snap, I didn't realize GHC2021 was a thing |
| 16:58:44 | <wroathe> | Nice |
| 17:00:28 | <EvanR> | for haskell + sql try HaskellDB! |
| 17:02:19 | <EvanR> | Currently supported database backends are: ... wxHaskell (??) |
| 17:02:43 | <EvanR> | my other backend is a frontend |
| 17:06:26 | <monochrom> | Centipede theory: One's backend is another's frontend. |
| 17:07:23 | <monochrom> | wxHaskell was a GUI libary not a DB library. :) |
| 17:08:22 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 17:08:26 | × | mikoto-chan quits (~mikoto-ch@ip-83-134-209-157.dsl.scarlet.be) (Ping timeout: 246 seconds) |
| 17:10:28 | <EvanR> | I can see how INSERT statements could cause stuff to appear on your screen |
| 17:10:36 | <EvanR> | but not sure how you can do a SELECT properly |
| 17:11:07 | <monochrom> | Perhaps SELECT means mouse and keybord input. :) |
| 17:11:26 | <APic> | ☺ |
| 17:11:39 | <wroathe> | Hmm |
| 17:11:40 | <wroathe> | https://gist.github.com/JustinChristensen/e275d3cc6d7f3a24c48351d29ef41a71 |
| 17:11:46 | <wroathe> | why would ghc do this to me |
| 17:11:53 | <monochrom> | This is known as a "select loop" >:) |
| 17:12:07 | <wroathe> | When I try to add that constraint to the instance it tells me I'd need UndecidableInstances to do that |
| 17:12:17 | <wroathe> | And I vaguely recall that UndecidableInstances are bad |
| 17:13:02 | <wroathe> | It's almost like I need to tell GHC that the type predicate IsPrimaryKey always "returns" an instance of ToBool |
| 17:13:30 | <wroathe> | It's not a partial type function. It should be defined for all types (as far as I can tell) |
| 17:13:37 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 250 seconds) |
| 17:16:42 | <EvanR> | soon you will be writing a GHC plugin |
| 17:16:58 | <wroathe> | EvanR: Let's hope it doesn't come to that |
| 17:17:29 | <wroathe> | I've had TAPL collecting dust on my bookshelf for like a decade now |
| 17:17:42 | <wroathe> | Too dense, and I'm too dumb |
| 17:17:57 | <EvanR> | there's some good stuff in there |
| 17:18:02 | <EvanR> | a lot of which is not in haskell |
| 17:18:41 | <dolio> | UndecidableInstances just means that GHC can't tell what you wrote will actually terminate. |
| 17:18:45 | <wroathe> | I just don't see why GHC can't see there that my closed type family always ranges over ToBool instances |
| 17:19:08 | <dolio> | There used to be mtl instances that required it, I think. Maybe still do. |
| 17:19:15 | <monochrom> | If you truly intend type-level computation then UndecidableInstances is necessary. The whole point. |
| 17:19:40 | <wroathe> | monochrom: So is that the missing piece here? Or is there a way to get GHC to recognize this relationship without it? |
| 17:19:44 | <monochrom> | My unpopular opinion though is that type-level computation is bad. UndecidableInstances is just a proxy. |
| 17:19:48 | <EvanR> | wroathe, maybe you're thinking of injective type families? |
| 17:20:03 | <EvanR> | maybe not |
| 17:20:29 | <wroathe> | EvanR: Would that get me there? I started reading about injective type families but it didn't seem like what I wanted at first glance so I put it down |
| 17:20:40 | <wroathe> | monochrom: Why is that your opinion? |
| 17:20:57 | <monochrom> | We already have value-level computation. |
| 17:21:06 | <EvanR> | probably a red herring, but it does let GHC deduce more stuff, I think |
| 17:22:20 | <dolio> | Lots of type level computation that people try doesn't pull its weight, because it gets increasingly clunky to use. |
| 17:22:50 | <wroathe> | monochrom: Metaprogramming is a technique with a long pedigree. It seems to me like you're suggesting that we should restrict ourselves to copying Haskell source files into the build output and then writing a value-level function that parses Haskell syntax and generates code from it |
| 17:23:01 | <EvanR> | wroathe, when you said general SQL for types I don't know why I didn't think you were just using TH |
| 17:23:05 | <EvanR> | generate* |
| 17:23:15 | <wroathe> | dolio: I could agree with that analysis. I'm just having fun at the moment, but I'm seeing how gnarly these instances are getting |
| 17:23:20 | <monochrom> | metaprogramming ≠ type-level computation |
| 17:23:51 | <dolio> | Yeah, fooling around is fine. It's how you learn when it's actually worth it. |
| 17:24:06 | <dolio> | Instead of just blindly following some "simple haskell" ethos. :) |
| 17:24:11 | <int-e> | monochrom: who met a programmer? |
| 17:24:12 | <monochrom> | I would associate metaprogramming with Scheme macros or Template Haskell. |
| 17:24:13 | <wroathe> | dolio: The inspiration here is Beam, which is obtuse to use and the documentation is incomplete |
| 17:24:28 | <wroathe> | I just wanted something I wrote that I maintain that lets me derive my database schema from my types |
| 17:24:53 | <wroathe> | int-e: Bad pun is bad |
| 17:24:59 | <wroathe> | For shame |
| 17:25:38 | <wroathe> | I suppose I could've done this with template haskell |
| 17:25:47 | <wroathe> | Might build an alternate version that does just that |
| 17:27:33 | <wroathe> | So is UndedicableInstances the way to go here? Or can I do better in terms of telling GHC that this closed type family is related to ToBool? |
| 17:29:25 | × | Simikando quits (~Simikando@adsl-dyn91.91-127-22.t-com.sk) (Ping timeout: 255 seconds) |
| 17:31:25 | <monochrom> | UndecidableInstances has a precise definition of what instances it allows that normally isn't. See the GHC user's guide. |
| 17:31:54 | × | fendor quits (~fendor@2a02:8388:1640:be00:c785:45ab:c70:9d3f) (Ping timeout: 255 seconds) |
| 17:32:15 | <monochrom> | So you just look at your instances and ask yourself "does it satisfy that condition?". |
| 17:35:26 | <monochrom> | On second thought, just let GHC tell you. :) |
| 17:35:57 | <wroathe> | It can sometimes be a challenge to map the rules written out in terse academic-like to speak to a practical use case. I'll give it a shot, though. |
| 17:36:10 | <wroathe> | In the language extension explanations, I mean |
| 17:38:09 | <EvanR> | need the 1940s field manual to UndecidableInstances written so beetle bailey can understand it |
| 17:38:51 | <wroathe> | Oh you know what... I was just in the middle of writing out an explanation complaining about this situation, but then I think I realized what GHC is struggling with here |
| 17:39:29 | <wroathe> | On paper it seems annoying that GHC should be able to recognize that IsPrimaryKey is closed, and that its range is the set of instances I've defined for ToBool |
| 17:39:43 | <wroathe> | But now that I think about that, ToBool is open |
| 17:40:08 | <wroathe> | So perhaps it's thinking that it can't known the full set of types ToBool will be defined for |
| 17:40:45 | <monochrom> | Only value definitions and closed families are closed. |
| 17:41:05 | <monochrom> | Due to separate compilation, almost everything has to be open-world. |
| 17:41:10 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 17:41:26 | <wroathe> | Yeah, and if this typeclass could be defined as closed I might think my complaints here were justified |
| 17:42:32 | <monochrom> | Some people add a method that expresses an induction principle to get very close to closedness. |
| 17:43:07 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:2dac:1dc7:bdec:1908) (Remote host closed the connection) |
| 17:43:27 | <wroathe> | That said, being that I've specified that b has kind Bool I would maybe hope that GHC would conclude that 'True and 'False are the only possible types for this typeclass |
| 17:43:47 | → | grnman_ joins (~michaelsc@c-66-176-3-51.hsd1.fl.comcast.net) |
| 17:44:50 | <monochrom> | Also IMO s/practical/intuitive/ . |
| 17:45:51 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:2dac:1dc7:bdec:1908) |
| 17:46:04 | <monochrom> | Look at other practical professions. Medicine and surgery. Accounting. Law. ... They all have their share of terse dense speak, in practice. |
| 17:46:18 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 255 seconds) |
| 17:46:29 | <monochrom> | terse dense counterintuitive-but-true-and-works |
| 17:46:55 | <monochrom> | Only programming and religions are so obsessed with "keep it intuitive". |
| 17:47:18 | <monochrom> | For this reason IMO programming is not mature enough to be called even a professions. So nevermind engineering. |
| 17:47:34 | <int-e> | it's important, how else are LLMs going to take away our jobs otherwise |
| 17:47:55 | <hpc> | you see jargon show up again when you get into the more difficult specialized types of programming, but a lot of programmers refuse to specialize |
| 17:48:01 | <int-e> | (this isn't offtopic? oops) |
| 17:48:14 | <monochrom> | Heh OK sorry I'll stop. |
| 17:48:31 | <geekosaur> | neh, we have our jargon, we just have weird rules for it |
| 17:49:12 | → | Simikando joins (~Simikando@adsl-dyn91.91-127-22.t-com.sk) |
| 17:50:07 | <geekosaur> | then again, so does everyone else's jargon |
| 17:50:19 | <wroathe> | monochrom: Well in general I just don't have the level of education required to unpack some of the shorthand I see in the haskell world. I'd say you're generalizing a bit too much by saying "we're" obsessed with keeping it intuitive. It's just the lower half of us that need a bit more context and explanation to grok a concept |
| 17:50:34 | <wroathe> | The people writing this stuff already deal in that shorthand |
| 17:50:54 | <geekosaur> | haskellers don't use programming jargon, they use math jargon |
| 17:51:14 | <wroathe> | And no amount of armchair research on the medical profession will turn me into a doctor. I still need the license and the time in the classroom |
| 17:51:31 | × | Simikando quits (~Simikando@adsl-dyn91.91-127-22.t-com.sk) (Remote host closed the connection) |
| 17:52:14 | <wroathe> | Imagine requiring a license to program professionally |
| 17:52:19 | <wroathe> | Employers would riot |
| 17:52:22 | <monochrom> | YES |
| 17:52:30 | <wroathe> | monochrom: I vote no |
| 17:52:34 | → | Simikando joins (~Simikando@adsl-dyn91.91-127-22.t-com.sk) |
| 17:52:35 | <wroathe> | Good luck with the yes vote |
| 17:58:00 | × | nyc quits (~nyc@2603-7000-a106-2fb5-0000-0000-0000-1f21.res6.spectrum.com) (Ping timeout: 245 seconds) |
| 18:00:31 | <EvanR> | you have to have a license to work on residential power stuff because it's dangerous |
| 18:00:49 | <EvanR> | but not to become a web developer |
| 18:00:52 | tabemann_ | is now known as tabemann |
| 18:00:55 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 255 seconds) |
| 18:01:18 | <[exa]> | welcome to web-driven residental power cloud |
| 18:01:54 | <Rembane> | Power cloud noises intensified* |
| 18:02:23 | <EvanR> | you need a license to make and sell alcohol, but not to send out social media mind blitz campaigns |
| 18:02:30 | <EvanR> | nvm |
| 18:07:11 | <danza> | well licenses do not always make quality in a craft, and having no licenses does not mean that craft is easy or accessible to anyone |
| 18:07:14 | × | Simikando quits (~Simikando@adsl-dyn91.91-127-22.t-com.sk) (Quit: Leaving) |
| 18:15:16 | → | wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com) |
| 18:15:16 | × | wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
| 18:15:16 | → | wroathe joins (~wroathe@user/wroathe) |
| 18:15:34 | → | aaronv joins (~aaronv@user/aaronv) |
| 18:15:49 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 18:16:09 | × | coot quits (~coot@89-69-206-216.dynamic.chello.pl) (Quit: coot) |
| 18:18:53 | × | wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer) |
| 18:20:03 | × | grnman_ quits (~michaelsc@c-66-176-3-51.hsd1.fl.comcast.net) (Ping timeout: 255 seconds) |
| 18:20:41 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 246 seconds) |
| 18:29:43 | × | Vajb quits (~Vajb@85-76-2-15-nat.elisa-mobile.fi) (Ping timeout: 255 seconds) |
| 18:33:15 | → | michalz joins (~michalz@185.246.207.197) |
| 18:35:32 | → | sord937 joins (~sord937@gateway/tor-sasl/sord937) |
| 18:37:15 | × | sord937 quits (~sord937@gateway/tor-sasl/sord937) (Client Quit) |
| 18:38:23 | × | dfg quits (~dfg@user/dfg) (Quit: I hate quit messages.) |
| 18:38:36 | × | aaronv quits (~aaronv@user/aaronv) (Remote host closed the connection) |
| 18:39:01 | → | aaronv joins (~aaronv@user/aaronv) |
| 18:40:23 | → | dfg joins (~dfg@dfg.rocks) |
| 18:40:23 | × | dfg quits (~dfg@dfg.rocks) (Changing host) |
| 18:40:23 | → | dfg joins (~dfg@user/dfg) |
| 18:51:31 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 18:52:02 | × | aaronv quits (~aaronv@user/aaronv) (Ping timeout: 246 seconds) |
| 18:52:03 | → | merijn joins (~merijn@088-129-128-083.dynamic.caiway.nl) |
| 18:52:26 | × | danza quits (~francesco@151.47.125.64) (Ping timeout: 245 seconds) |
| 18:55:27 | × | Jackneill_ quits (~Jackneill@20014C4E1E04F9003F4C923B253B51CB.dsl.pool.telekom.hu) (Ping timeout: 258 seconds) |
| 18:56:17 | → | danza joins (~francesco@151.47.125.64) |
| 18:56:19 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 250 seconds) |
| 19:03:53 | × | merijn quits (~merijn@088-129-128-083.dynamic.caiway.nl) (Ping timeout: 258 seconds) |
| 19:12:11 | × | falafel quits (~falafel@62.175.113.194.dyn.user.ono.com) (Ping timeout: 244 seconds) |
| 19:15:08 | × | jespada quits (~jespada@cpc121308-nmal25-2-0-cust15.19-2.cable.virginm.net) (Ping timeout: 246 seconds) |
| 19:16:45 | × | juri_ quits (~juri@84-19-175-187.pool.ovpn.com) (Ping timeout: 255 seconds) |
| 19:22:57 | × | michalz quits (~michalz@185.246.207.197) (Remote host closed the connection) |
| 19:23:25 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 19:24:24 | × | danza quits (~francesco@151.47.125.64) (Ping timeout: 255 seconds) |
| 19:27:19 | → | aaronv joins (~aaronv@user/aaronv) |
| 19:27:31 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 19:30:25 | → | fendor joins (~fendor@2a02:8388:1640:be00:c785:45ab:c70:9d3f) |
| 19:31:05 | → | superbil joins (~superbil@1-34-176-171.hinet-ip.hinet.net) |
| 19:31:30 | → | Vajb joins (~Vajb@2001:999:709:354:95b0:25d4:572e:8cd8) |
| 19:32:27 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 245 seconds) |
| 19:36:12 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 19:36:30 | → | juri_ joins (~juri@84-19-175-187.pool.ovpn.com) |
| 19:45:11 | → | danza joins (~francesco@151.47.125.64) |
| 19:45:15 | <erisco> | I am looking for a web server that I can point at a local directory and serve its contents on localhost. A dev server. |
| 19:45:47 | → | jargon joins (~jargon@184.101.191.140) |
| 19:47:37 | <mauke> | I bet there's at least 3 written in python |
| 19:48:30 | <erisco> | I didn't come to #haskell to get a web server made with Python! |
| 19:48:50 | <erisco> | looks like Yesod comes with a development server, if I can figure out how to install it |
| 19:48:51 | <mauke> | sorry, I'll look for something written in perl |
| 19:49:39 | <erisco> | it is just a matter of consolidating dev tools... there are dozens I could pull in from npm |
| 19:51:33 | → | falafel joins (~falafel@62.175.113.194.dyn.user.ono.com) |
| 19:54:40 | × | Vajb quits (~Vajb@2001:999:709:354:95b0:25d4:572e:8cd8) (Ping timeout: 245 seconds) |
| 19:55:12 | → | merijn joins (~merijn@088-129-128-083.dynamic.caiway.nl) |
| 19:55:35 | → | Vajb joins (~Vajb@2001:999:500:7771:18aa:c4e5:e7a9:f44b) |
| 19:58:48 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 20:00:43 | → | danza_ joins (~francesco@151.43.103.246) |
| 20:00:50 | → | nyc joins (~nyc@2603-7000-a106-2fb5-0000-0000-0000-1f21.res6.spectrum.com) |
| 20:00:52 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 20:00:56 | × | danza quits (~francesco@151.47.125.64) (Read error: Connection reset by peer) |
| 20:02:29 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 20:06:55 | × | merijn quits (~merijn@088-129-128-083.dynamic.caiway.nl) (Ping timeout: 255 seconds) |
| 20:07:17 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 246 seconds) |
| 20:07:36 | × | aaronv quits (~aaronv@user/aaronv) (Ping timeout: 255 seconds) |
| 20:09:53 | <geekosaur> | afaik you just install the yesod binary (cabal/stack install yesod) and use `yesod dev`? |
| 20:10:49 | → | infinity0 joins (~infinity0@pwned.gg) |
| 20:12:40 | → | aaronv joins (~aaronv@user/aaronv) |
| 20:12:57 | → | mechap joins (~mechap@user/mechap) |
| 20:18:15 | → | xmachina joins (~xmachina@modemcable048.127-56-74.mc.videotron.ca) |
| 20:24:25 | <erisco> | it looks like it is tied into building and watching a project |
| 20:24:34 | × | _ht quits (~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Remote host closed the connection) |
| 20:24:55 | <erisco> | I'll take a squizz through github tomorrow and see if something stands out |
| 20:25:55 | × | hpc quits (~juzz@ip98-169-35-163.dc.dc.cox.net) (Ping timeout: 245 seconds) |
| 20:26:08 | → | machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net) |
| 20:27:21 | <EvanR> | what is a squizz |
| 20:27:34 | <EvanR> | is that like a scrum |
| 20:29:58 | → | jero98772 joins (~jero98772@2800:484:1d84:300::2) |
| 20:39:53 | × | xmachina quits (~xmachina@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 4.0.4) |
| 20:43:36 | × | aaronv quits (~aaronv@user/aaronv) (Ping timeout: 255 seconds) |
| 20:50:22 | → | nate2 joins (~nate@c-98-45-169-16.hsd1.ca.comcast.net) |
| 20:51:00 | → | aaronv joins (~aaronv@user/aaronv) |
| 20:51:55 | × | falafel quits (~falafel@62.175.113.194.dyn.user.ono.com) (Ping timeout: 255 seconds) |
| 20:54:17 | → | xmachina joins (~xmachina@modemcable048.127-56-74.mc.videotron.ca) |
| 20:54:41 | × | xmachina quits (~xmachina@modemcable048.127-56-74.mc.videotron.ca) (Client Quit) |
| 20:55:18 | × | nate2 quits (~nate@c-98-45-169-16.hsd1.ca.comcast.net) (Ping timeout: 255 seconds) |
| 20:56:34 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:2dac:1dc7:bdec:1908) (Remote host closed the connection) |
| 20:58:36 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 21:01:22 | <monochrom> | Serving a directory content to http --- apache. There should be Haskell implementations but I don't know which. |
| 21:02:14 | <monochrom> | I may know one but it's an old paper about "this shows a simple web server in Haskell in 100 lines". |
| 21:03:24 | <monochrom> | On the plus side it's exactly just serving exisiting files, none of those "routing" RESTful business. On the minus side it's old, probably doesn't build today. |
| 21:09:56 | × | acidjnk quits (~acidjnk@p200300d6e7072f47410f32a7f56ccb8a.dip0.t-ipconnect.de) (Ping timeout: 245 seconds) |
| 21:13:53 | <mauke> | serving existing files is RESTful |
| 21:14:11 | <mauke> | especially if you implement directory listings |
| 21:15:47 | <monochrom> | OK, s/RESTful/web API/ |
| 21:16:59 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:2dac:1dc7:bdec:1908) |
| 21:30:02 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 246 seconds) |
| 21:30:47 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 21:31:17 | × | aaronv quits (~aaronv@user/aaronv) (Ping timeout: 246 seconds) |
| 21:33:19 | × | fendor quits (~fendor@2a02:8388:1640:be00:c785:45ab:c70:9d3f) (Remote host closed the connection) |
| 21:36:10 | → | libertyprime joins (~libertypr@203.96.203.44) |
| 21:39:06 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 246 seconds) |
| 21:44:01 | → | wroathe joins (~wroathe@user/wroathe) |
| 21:44:39 | → | aaronv joins (~aaronv@user/aaronv) |
| 21:46:24 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 21:48:17 | × | phma quits (~phma@host-67-44-208-43.hnremote.net) (Read error: Connection reset by peer) |
| 21:48:44 | → | phma joins (phma@2001:5b0:212a:fde8:c9be:1be2:ad07:be0c) |
| 21:52:22 | → | sm joins (~sm@plaintextaccounting/sm) |
| 21:55:01 | Feuermagier | is now known as Guest4765 |
| 21:55:01 | → | Feuermagier_ joins (~Feuermagi@user/feuermagier) |
| 21:55:01 | × | Guest4765 quits (~Feuermagi@user/feuermagier) (Killed (zirconium.libera.chat (Nickname regained by services))) |
| 21:55:01 | Feuermagier_ | is now known as Feuermagier |
| 21:55:12 | × | mechap quits (~mechap@user/mechap) (Quit: WeeChat 4.0.4) |
| 21:59:48 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 22:00:15 | <jackdk> | erisco: https://hackage.haskell.org/package/wai-app-static suit your needs? |
| 22:01:35 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 22:05:47 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 244 seconds) |
| 22:10:50 | × | sm quits (~sm@plaintextaccounting/sm) (Quit: sm) |
| 22:11:37 | → | falafel joins (~falafel@62.175.113.194.dyn.user.ono.com) |
| 22:18:37 | <erisco> | jackdk, just might, thanks! |
| 22:18:44 | × | Feuermagier quits (~Feuermagi@user/feuermagier) (Remote host closed the connection) |
| 22:18:59 | → | Feuermagier joins (~Feuermagi@user/feuermagier) |
| 22:41:43 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 22:42:25 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 22:46:27 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 255 seconds) |
| 22:48:29 | → | Guest|79 joins (~Guest|79@129.8.28.123) |
| 22:48:47 | <Guest|79> | hi |
| 22:49:23 | <Guest|79> | can you give the command for importing the packages for using the functions like SUm |
| 22:50:00 | → | arahael joins (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) |
| 22:50:37 | <monochrom> | sum is already present by default, no command needed. |
| 22:50:53 | × | aaronv quits (~aaronv@user/aaronv) (Remote host closed the connection) |
| 22:51:02 | <monochrom> | Show actual code that doesn't compile. |
| 22:51:15 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 22:51:18 | → | aaronv joins (~aaronv@user/aaronv) |
| 22:52:12 | <haskellbridge> | <jade> well, `SUm` won't work as haskell is case sensitive with symbols :^) |
| 22:52:30 | <Guest|79> | ghci> lst = [2,4,5,6] |
| 22:52:31 | <Guest|79> | ghci> Sum(map(2*) lst) |
| 22:52:31 | <Guest|79> | <interactive>:3:1: error: |
| 22:52:32 | <Guest|79> | * Data constructor not in scope: Sum :: [b0] -> t |
| 22:52:32 | <Guest|79> | * Perhaps you meant variable `sum' (imported from Prelude) |
| 22:52:33 | <Guest|79> | ghci> cabal repl --build-depends filepath |
| 22:53:03 | <haskellbridge> | <jade> it is `sum` (all lowercase) |
| 22:53:12 | <yushyin> | "* Perhaps you meant variable `sum' (imported from Prelude)" |
| 22:54:20 | <haskellbridge> | <jade> `Sum` is something else, namely the `Sum` monoid which is defined via `Sum a <> Sum b = Sum (a + b)` and `mempty = 0` |
| 22:54:33 | × | arahael quits (~arahael@119-18-1-27.771201.syd.nbn.aussiebb.net) (Ping timeout: 255 seconds) |
| 22:55:31 | <monochrom> | Lower case. sum (map (2*) lst) |
| 22:55:36 | <Guest|79> | Then how to declare a list and i need to double the every element in list and need to sum that |
| 22:56:23 | <monochrom> | It's 2023 why do some programmers still expect programming languages to be case-insensitive? Did they grow up in BASIC or something? |
| 22:56:27 | <haskellbridge> | <jade> `sum . map (*2)` as you said |
| 22:57:19 | <monochrom> | > sum (map (2*) [1,2,3]) |
| 22:57:20 | <lambdabot> | 12 |
| 22:58:15 | → | grnman_ joins (~michaelsc@c-66-176-3-51.hsd1.fl.comcast.net) |
| 22:58:36 | × | Tuplanolla quits (~Tuplanoll@91-159-68-236.elisa-laajakaista.fi) (Ping timeout: 255 seconds) |
| 22:58:57 | → | robobub joins (uid248673@id-248673.uxbridge.irccloud.com) |
| 22:58:59 | <Guest|79> | ghci> lst = [2,3,4,5] |
| 22:59:00 | <Guest|79> | ghci> sum(map(2*) lst) |
| 22:59:00 | <Guest|79> | 28 |
| 22:59:01 | <Guest|79> | This code worked.. Thank you |
| 23:02:13 | × | Guest|79 quits (~Guest|79@129.8.28.123) (Quit: Connection closed) |
| 23:02:24 | → | Guest|79 joins (~Guest|79@129.8.28.123) |
| 23:04:00 | × | libertyprime quits (~libertypr@203.96.203.44) (Ping timeout: 255 seconds) |
| 23:05:37 | × | aaronv quits (~aaronv@user/aaronv) (Remote host closed the connection) |
| 23:05:39 | <Guest|79> | can any one know the code for preorder traversal for binary tree |
| 23:06:03 | → | aaronv joins (~aaronv@user/aaronv) |
| 23:06:40 | <monochrom> | Use direct recursion. |
| 23:06:44 | <yushyin> | that sounds like homework |
| 23:07:28 | <monochrom> | Show actual code of your attempt if you want comments on what you did wrong. |
| 23:09:16 | → | arahael joins (~arahael@1.145.95.87) |
| 23:11:36 | × | falafel quits (~falafel@62.175.113.194.dyn.user.ono.com) (Ping timeout: 245 seconds) |
| 23:14:26 | → | libertyprime joins (~libertypr@203.96.203.44) |
| 23:16:11 | <Guest|79> | data BinaryTree a = Empty | Node a (BinaryTree a) (BinaryTree a) deriving (Show, Eq) |
| 23:16:11 | <Guest|79> | preorder :: BinaryTree a -> [a] |
| 23:16:12 | <Guest|79> | preorder Empty = [] |
| 23:16:12 | <Guest|79> | preorder (Node value left right) = [value] ++ preorder left ++ preorder right |
| 23:16:13 | <Guest|79> | main :: IO () |
| 23:16:13 | <Guest|79> | main = do |
| 23:16:14 | <Guest|79> | let tree = Node 1 (Node 2 (Node 4 Empty Empty) (Node 5 Empty Empty)) (Node 3 Empty Empty) |
| 23:16:14 | <Guest|79> | print $ preorder tree |
| 23:17:15 | <Guest|79> | i did this code |
| 23:19:20 | → | Guest|2 joins (~Guest|2@129.8.217.15) |
| 23:19:27 | × | Guest|2 quits (~Guest|2@129.8.217.15) (Client Quit) |
| 23:20:22 | → | hpc joins (~juzz@ip98-169-35-163.dc.dc.cox.net) |
| 23:20:35 | <phma> | EvanR: a squizz (or squiz) is a look. |
| 23:21:48 | <Guest|79> | was this code correct for pre order traversal? |
| 23:22:22 | → | danse-nr3 joins (~francesco@151.43.103.246) |
| 23:23:34 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:2dac:1dc7:bdec:1908) (Remote host closed the connection) |
| 23:23:48 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 255 seconds) |
| 23:23:48 | × | danza_ quits (~francesco@151.43.103.246) (Ping timeout: 255 seconds) |
| 23:24:11 | <phma> | http://mailman.swarpa.net/pipermail/fictionary/2017/004493.html |
| 23:25:09 | × | libertyprime quits (~libertypr@203.96.203.44) (Ping timeout: 255 seconds) |
| 23:25:23 | × | ulysses4ever quits (~artem@2601:249:4380:8950:f474:e3f8:9806:671) (Read error: Connection reset by peer) |
| 23:25:32 | → | ulysses4ever joins (~artem@2601:249:4380:8950:f474:e3f8:9806:671) |
| 23:26:31 | × | jero98772 quits (~jero98772@2800:484:1d84:300::2) (Quit: leaving) |
| 23:31:00 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 255 seconds) |
| 23:31:48 | × | Guest|79 quits (~Guest|79@129.8.28.123) (Quit: Connection closed) |
| 23:35:47 | × | talismanick quits (~user@2601:204:ef80:2980::c39) (Remote host closed the connection) |
| 23:37:49 | × | aaronv quits (~aaronv@user/aaronv) (Ping timeout: 246 seconds) |
| 23:43:51 | → | aaronv joins (~aaronv@user/aaronv) |
| 23:44:44 | × | arahael quits (~arahael@1.145.95.87) (Ping timeout: 248 seconds) |
| 23:46:47 | <[Leary]> | @free fold :: (a -> a -> a) -> a -> T a -> a |
| 23:46:47 | <lambdabot> | (forall x. f . g x = h (f x) . f) => f . fold g y = fold h (f y) . $map_T f |
| 23:47:02 | <[Leary]> | Corollary: if `f` is a monoid homomorphism, then `f . fold = fold . map f`. Proof: Let g = h = (<>), y = mempty. |
| 23:47:17 | <[Leary]> | I'm a bit late, but this free theorem was just too good to keep to myself. :) |
| 23:48:16 | <monochrom> | Nice, I may put it on homework next time :) |
| 23:50:35 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 23:50:46 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 246 seconds) |
| 23:51:56 | Lord_of_Life_ | is now known as Lord_of_Life |
| 23:53:39 | <danse-nr3> | what is @free aliased to? |
| 23:54:59 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:2dac:1dc7:bdec:1908) |
| 23:55:16 | <[Leary]> | @help free |
| 23:55:16 | <lambdabot> | free <ident>. Generate theorems for free |
| 23:55:51 | <[Leary]> | It's not an alias, it just brings out the mathematician in lambdabot. |
| 23:55:53 | <monochrom> | @free is itself. |
| 23:56:11 | × | aaronv quits (~aaronv@user/aaronv) (Ping timeout: 246 seconds) |
| 23:56:31 | <monochrom> | But you can take a look at the paper "theorems for free!" for what it's about. |
| 23:56:41 | × | tremon quits (~tremon@83.80.159.219) (Quit: getting boxed in) |
| 23:58:09 | <danse-nr3> | thanks, i guess it relies on https://hackage.haskell.org/package/free-theorems, i will note the paper to have a look eventually |
All times are in UTC on 2023-09-03.