Logs: freenode/#haskell
| 2021-03-07 16:53:53 | × | Guest95072 quits (~textual@zrcout.mskcc.org) (Ping timeout: 256 seconds) |
| 2021-03-07 16:55:29 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:ad8c:89aa:bf10:9556) |
| 2021-03-07 16:56:50 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:ad8c:89aa:bf10:9556) (Remote host closed the connection) |
| 2021-03-07 16:56:52 | → | hiptobecubic joins (~john@unaffiliated/hiptobecubic) |
| 2021-03-07 16:57:46 | <mikoto-chan> | So I was trying to check the data constructor of my ADT `data Vehicle = Car Manufacturer Price deriving (Eq, Show)` to build a function called isCar, I ended up with `isCar x = (head . words $ show x) == "Car"` but I was wondering if a poiny-free function was possible as well |
| 2021-03-07 16:57:50 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:2076:7626:28f5:58b2) |
| 2021-03-07 16:58:01 | <ADG1089__> | I was able to reduce runtime which felt like exponential by manually unrolling 1 level of recursion probably which short-circuited lot of branches |
| 2021-03-07 16:58:25 | <geekosaur> | possible but probably ugly |
| 2021-03-07 16:58:51 | <mikoto-chan> | geekosaur: I'm curious :) |
| 2021-03-07 16:59:01 | <geekosaur> | @pl \x -> (head . words $ show x) == "Car" |
| 2021-03-07 16:59:01 | <lambdabot> | ("Car" ==) . head . words . show |
| 2021-03-07 16:59:02 | <kuribas> | ADG1089__: lists are slow, if you want speed, use unboxed vectors instead. |
| 2021-03-07 16:59:09 | <geekosaur> | huh, not too terrible |
| 2021-03-07 17:00:18 | <carbolymer> | if my application will be run on a single core - does it make sense to remove -threaded and -with-rtsopts=-N from ghc options? |
| 2021-03-07 17:00:44 | <mikoto-chan> | geekosaur: What's @? (sorry I don't know what Monads are yet) |
| 2021-03-07 17:01:00 | <ADG1089__> | I was able to reach from >10m to 3.19 sec by this unroll thing. does INLINE pragma do same thing for recursive function. Can I specify unrolling depth. Maybe this causes firing map, fold, etc. rules |
| 2021-03-07 17:01:05 | <geekosaur> | there are still some advantages to using the threaded runtime, so -threaded -N1 may make sense |
| 2021-03-07 17:01:27 | <geekosaur> | mikoto-chan, @pl is a bot command |
| 2021-03-07 17:01:41 | <geekosaur> | the bot replied with the point-free version of the lambda |
| 2021-03-07 17:01:42 | <mikoto-chan> | Oh nvm in that case I understand what you wrote thx :) |
| 2021-03-07 17:01:50 | <mikoto-chan> | That's cool! |
| 2021-03-07 17:01:54 | × | bigbosskor quits (~Android@223.204.217.185) (Read error: Connection reset by peer) |
| 2021-03-07 17:01:55 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:2076:7626:28f5:58b2) (Ping timeout: 240 seconds) |
| 2021-03-07 17:01:56 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) |
| 2021-03-07 17:02:35 | × | ystael quits (~ystael@209.6.50.55) (Read error: Connection reset by peer) |
| 2021-03-07 17:03:44 | <carbolymer> | geekosaur: is using threaded runtime causing any runtime overhead? |
| 2021-03-07 17:04:34 | × | NieDzejkob quits (~quassel@195.149.98.3) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 2021-03-07 17:05:13 | → | ystael joins (~ystael@209.6.50.55) |
| 2021-03-07 17:05:41 | → | bigbosskor joins (~Android@223.204.217.185) |
| 2021-03-07 17:07:00 | → | cafce25 joins (~cafce25@ipbcc3009d.dynamic.kabel-deutschland.de) |
| 2021-03-07 17:07:49 | <geekosaur> | the default threaded gc may, so try -qg as a runtime option |
| 2021-03-07 17:07:58 | → | NieDzejkob joins (~quassel@195.149.98.3) |
| 2021-03-07 17:08:08 | <geekosaur> | otherwise, the threaded runtime is generally lower overhead iirc |
| 2021-03-07 17:08:35 | <carbolymer> | ok, thx |
| 2021-03-07 17:09:28 | → | Alleria joins (~textual@2603-7000-3040-0000-1db4-c99c-5289-cfbe.res6.spectrum.com) |
| 2021-03-07 17:09:29 | × | curiousgay quits (~gay@178.217.208.8) (Remote host closed the connection) |
| 2021-03-07 17:09:52 | Alleria | is now known as Guest78778 |
| 2021-03-07 17:13:05 | <infinisil> | mikoto-chan: Do you have any other data constructors than Car? |
| 2021-03-07 17:13:07 | → | minoru_shiraeesh joins (~shiraeesh@109.166.57.19) |
| 2021-03-07 17:13:26 | × | Jd007 quits (~Jd007@162.156.11.151) (Quit: Jd007) |
| 2021-03-07 17:13:31 | → | curiousgay joins (~gay@178.217.208.8) |
| 2021-03-07 17:14:20 | <infinisil> | I mean, how about just `isCar (Car {}) = True` |
| 2021-03-07 17:14:31 | <infinisil> | (parens not needed actually) |
| 2021-03-07 17:15:15 | → | Schrostfutz joins (~Schrostfu@p2e585ac0.dip0.t-ipconnect.de) |
| 2021-03-07 17:15:57 | <mikoto-chan> | infinisil: What's {} in an ADT? |
| 2021-03-07 17:16:04 | <mikoto-chan> | I got a solution don't worry |
| 2021-03-07 17:16:13 | <geekosaur> | right, there are easier ways to do what you asked but it depends on how far you';re going with it |
| 2021-03-07 17:16:28 | <geekosaur> | it's part of a pattern match |
| 2021-03-07 17:16:29 | <infinisil> | mikoto-chan: That's just `isCar (Car _ _)` |
| 2021-03-07 17:16:36 | <infinisil> | {} can be used instead |
| 2021-03-07 17:16:50 | <infinisil> | mikoto-chan: Well, the above Show solution is pretty awful |
| 2021-03-07 17:17:04 | <geekosaur> | you're matching it as a record but not inspecting any fields from it, which is valid even if it's not declared as a record |
| 2021-03-07 17:17:42 | × | Guest78778 quits (~textual@2603-7000-3040-0000-1db4-c99c-5289-cfbe.res6.spectrum.com) (*.net *.split) |
| 2021-03-07 17:17:42 | × | ReinH__ quits (sid179972@gateway/web/irccloud.com/x-hfoejwfalpquomyg) (*.net *.split) |
| 2021-03-07 17:17:42 | × | AndreasK quits (sid320732@gateway/web/irccloud.com/x-laayufbotskvbggw) (*.net *.split) |
| 2021-03-07 17:17:42 | × | alunduil quits (alunduil@gateway/web/irccloud.com/x-plfpkpelheyvdkct) (*.net *.split) |
| 2021-03-07 17:17:42 | × | dexterlb quits (~dexterlb@2a01:9e40:2:2::2) (*.net *.split) |
| 2021-03-07 17:17:42 | × | astroanax quits (astroanax@gateway/shell/ircnow/x-tmpmjymczmbdbrbq) (*.net *.split) |
| 2021-03-07 17:17:42 | × | PoliticsII______ quits (sid193551@gateway/web/irccloud.com/x-yldlxzypsmfoijoc) (*.net *.split) |
| 2021-03-07 17:17:42 | × | loyon quits (loyonmatri@gateway/shell/matrix.org/x-pibcmanmmawjsdlg) (*.net *.split) |
| 2021-03-07 17:17:42 | × | bwe_ quits (~bwe@2a01:4f8:1c1c:4878::2) (*.net *.split) |
| 2021-03-07 17:17:42 | × | PyroLagus quits (PyroLagus@i.have.ipv6.on.coding4coffee.org) (*.net *.split) |
| 2021-03-07 17:17:42 | × | shadowdaemon quits (~user@unaffiliated/shadowdaemon) (*.net *.split) |
| 2021-03-07 17:17:43 | × | vqrs_ quits (~vqrs@learnprogramming/regular/vqrs) (*.net *.split) |
| 2021-03-07 17:17:43 | × | SegFaultAX quits (SegFaultAX@unaffiliated/segfaultax) (*.net *.split) |
| 2021-03-07 17:17:43 | × | suzu quits (~scaleuser@2001:bc8:1824:43f::1) (*.net *.split) |
| 2021-03-07 17:17:43 | × | mursu_ quits (~ngWalrus@2a03:b0c0:3:d0::5ebd:2001) (*.net *.split) |
| 2021-03-07 17:17:43 | × | ViCi quits (daniel@10PLM.ro) (*.net *.split) |
| 2021-03-07 17:17:43 | × | Bigcheese quits (~quassel@unaffiliated/bigcheese) (*.net *.split) |
| 2021-03-07 17:17:43 | × | idupree quits (~quassel@2604:a880:400:d0::9bb:2001) (*.net *.split) |
| 2021-03-07 17:17:43 | × | recon_- quits (~quassel@2602:febc:0:b6::6ca2) (*.net *.split) |
| 2021-03-07 17:17:43 | × | DigitalKiwi quits (~kiwi@unaffiliated/digitalkiwi) (*.net *.split) |
| 2021-03-07 17:17:43 | × | rizary quits (sid220347@gateway/web/irccloud.com/x-dnbpomskxmxznero) (*.net *.split) |
| 2021-03-07 17:17:43 | × | Jon quits (jon@dow.land) (*.net *.split) |
| 2021-03-07 17:17:43 | × | zgrep quits (~zgrep@ircpuzzles/2015/april-fools/sixth/zgrep) (*.net *.split) |
| 2021-03-07 17:17:43 | × | drdo quits (~drdo@overlord0.drdo.eu) (*.net *.split) |
| 2021-03-07 17:17:43 | × | enikar quits (~enikar@2001:41d0:2:8673::42) (*.net *.split) |
| 2021-03-07 17:17:43 | × | lpsmith quits (~lpsmith@unaffiliated/lpsmith) (*.net *.split) |
| 2021-03-07 17:17:43 | × | oats quits (~hurr@durr/im/a/sheep) (*.net *.split) |
| 2021-03-07 17:17:43 | × | johs quits (sid246410@gateway/web/irccloud.com/x-acsueohqkhvorgaz) (*.net *.split) |
| 2021-03-07 17:17:43 | × | Zialus quits (~RMF@2001:818:de63:c300:211:32ff:fe8d:ad29) (*.net *.split) |
| 2021-03-07 17:17:43 | × | bspar quits (~bspar@2604:a880:0:1010::776:e001) (*.net *.split) |
| 2021-03-07 17:17:43 | × | Firedancer quits (sid336191@gateway/web/irccloud.com/x-eykckjivzotazeph) (*.net *.split) |
| 2021-03-07 17:17:43 | × | dumptruckman quits (dumptruckm@2600:3c02::f03c:91ff:fe6e:2cfd) (*.net *.split) |
| 2021-03-07 17:17:43 | × | Orbstheorem quits (~roosember@hellendaal.orbstheorem.ch) (*.net *.split) |
| 2021-03-07 17:17:43 | × | hongminhee quits (hongminhee@gateway/web/irccloud.com/x-mtlcwvdsuqyxumrm) (*.net *.split) |
| 2021-03-07 17:17:43 | × | gluegadget quits (sid22336@gateway/web/irccloud.com/x-aztbcwiepgvjkpoz) (*.net *.split) |
| 2021-03-07 17:17:43 | × | edwinb quits (sid69486@gateway/web/irccloud.com/x-qvjalasgpdxobhmu) (*.net *.split) |
| 2021-03-07 17:17:43 | × | adius quits (sid321344@gateway/web/irccloud.com/x-zbzvezfksextairk) (*.net *.split) |
| 2021-03-07 17:17:43 | × | lexi-lambda quits (sid92601@gateway/web/irccloud.com/x-ricmwvpaftynkwyw) (*.net *.split) |
| 2021-03-07 17:17:43 | × | jackdk quits (sid373013@gateway/web/irccloud.com/x-xchalanqtvxxyxtk) (*.net *.split) |
| 2021-03-07 17:17:43 | × | ghuntley quits (sid16877@gateway/web/irccloud.com/x-nfchurevxdfsquhn) (*.net *.split) |
| 2021-03-07 17:17:43 | × | srhb quits (sid400352@NixOS/user/srhb) (*.net *.split) |
| 2021-03-07 17:17:43 | × | dani- quits (sid341953@gateway/web/irccloud.com/x-oxdrwcxmvvwbwbls) (*.net *.split) |
| 2021-03-07 17:17:43 | × | hazard-pointer_ quits (sid331723@gateway/web/irccloud.com/x-gnedozzvydjopbjw) (*.net *.split) |
| 2021-03-07 17:17:43 | × | taktoa[c] quits (sid282096@gateway/web/irccloud.com/x-zyzffnttjvrtjmgf) (*.net *.split) |
| 2021-03-07 17:17:43 | × | milessabin quits (sid86799@gateway/web/irccloud.com/x-lbjrkurwvvdrwvdy) (*.net *.split) |
| 2021-03-07 17:17:43 | × | kyagrd__ quits (sid102627@gateway/web/irccloud.com/x-szfupawrcsntctxo) (*.net *.split) |
| 2021-03-07 17:17:43 | × | benwr____ quits (sid372383@gateway/web/irccloud.com/x-wbetztxmwtfyzapm) (*.net *.split) |
| 2021-03-07 17:17:43 | × | lally quits (sid388228@gateway/web/irccloud.com/x-wbgxlvraedqmtqcc) (*.net *.split) |
All times are in UTC.