Logs: freenode/#haskell
| 2021-04-08 21:04:49 | <koz_> | (and 'generateM') |
| 2021-04-08 21:05:10 | <nut> | numerical analysis or number crunching? |
| 2021-04-08 21:05:24 | <koz_> | Depends on the problem. |
| 2021-04-08 21:05:28 | <koz_> | I can't generalize for whole fields. |
| 2021-04-08 21:05:38 | <koz_> | Your choice of data structure is highly problem-specific. |
| 2021-04-08 21:06:26 | <monochrom> | Immutable vector shines when either it's write-only-read-many-times (e.g., dynamic programming) or the new vector is a streaming transform of the old vector. |
| 2021-04-08 21:06:43 | × | gehmehgeh quits (~ircuser1@gateway/tor-sasl/gehmehgeh) (Quit: Leaving) |
| 2021-04-08 21:06:44 | <monochrom> | err write-once-read-many-times |
| 2021-04-08 21:07:04 | <koz_> | I'd supplement by saying 'it also depends how the vector is produced'. |
| 2021-04-08 21:07:18 | <koz_> | If you can phrase your construction in terms of 'generate' or 'generateM'? You win very big. |
| 2021-04-08 21:07:27 | <monochrom> | Yeah, that. |
| 2021-04-08 21:07:29 | <koz_> | (and they're surprisingly powerful primitives) |
| 2021-04-08 21:07:51 | × | pfurla quits (~pfurla@mx141.canadialed.com) (Ping timeout: 260 seconds) |
| 2021-04-08 21:07:57 | <koz_> | I've had at least two cases in recent memory where someone tried to do something gory with arrays, and it ran terribly; upon further inspection, what they wanted was 'generate'. |
| 2021-04-08 21:07:57 | <nut> | How do you 'write' once immutable vectors? |
| 2021-04-08 21:08:08 | <koz_> | nut: You don't - you use a construction function which builds them. |
| 2021-04-08 21:08:10 | <koz_> | (like 'generate') |
| 2021-04-08 21:08:18 | <monochrom> | The same way you write-once a binary tree |
| 2021-04-08 21:08:19 | <nut> | i see |
| 2021-04-08 21:08:51 | <monochrom> | The same way you set up "final variables" in Java. |
| 2021-04-08 21:09:08 | <nut> | that's indeed a new idea for me |
| 2021-04-08 21:09:19 | <koz_> | nut: It takes adjustment. |
| 2021-04-08 21:09:33 | <koz_> | But trying to hammer the square peg of mutation into every possible Haskell hole won't end well. |
| 2021-04-08 21:09:45 | <koz_> | A good practice - start by doing _everything_ immutably. |
| 2021-04-08 21:09:51 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:4552:1533:b307:c3a6) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2021-04-08 21:10:07 | <koz_> | You can always change it later if you find it's slow. However, you probably won't. |
| 2021-04-08 21:10:39 | × | nckx quits (~nckx@tobias.gr) (Quit: Updating my Guix System — https://guix.gnu.org) |
| 2021-04-08 21:10:47 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 2021-04-08 21:11:57 | → | kiweun joins (~kiweun@2607:fea8:2a62:9600:1169:451:f7b9:a016) |
| 2021-04-08 21:12:30 | <dcbdan> | what is 'generate' , 'generateM' ? |
| 2021-04-08 21:12:44 | <koz_> | https://hackage.haskell.org/package/vector-0.12.3.0/docs/Data-Vector.html#v:generate |
| 2021-04-08 21:12:50 | <koz_> | https://hackage.haskell.org/package/vector-0.12.3.0/docs/Data-Vector.html#v:generateM |
| 2021-04-08 21:13:27 | <dcbdan> | got it |
| 2021-04-08 21:14:04 | → | shalokshalom joins (~quassel@2a02:1748:dd5e:7f60:cf49:8384:7c93:3106) |
| 2021-04-08 21:15:06 | <minoru_shiraeesh> | dcbdan: regarding a question about debugging: there is a ghc-vis too |
| 2021-04-08 21:15:33 | <minoru_shiraeesh> | not sure if it's convenient to debug with, but looks cool |
| 2021-04-08 21:16:44 | × | kiweun quits (~kiweun@2607:fea8:2a62:9600:1169:451:f7b9:a016) (Ping timeout: 258 seconds) |
| 2021-04-08 21:16:49 | <dcbdan> | look at the image about 3/4s down: http://felsin9.de/nnis/ghc-vis/#basic-usage |
| 2021-04-08 21:16:58 | <dcbdan> | kinda scary, kinda beautiful |
| 2021-04-08 21:17:37 | <dcbdan> | ^ minoru_shiraeesh |
| 2021-04-08 21:18:21 | × | malumore quits (~malumore@151.62.113.39) (Ping timeout: 260 seconds) |
| 2021-04-08 21:19:15 | × | danvet quits (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 248 seconds) |
| 2021-04-08 21:20:32 | → | Habib joins (~Habib@185.169.233.238) |
| 2021-04-08 21:20:43 | × | ddellaco_ quits (~ddellacos@ool-44c73afa.dyn.optonline.net) (Remote host closed the connection) |
| 2021-04-08 21:21:26 | <minoru_shiraeesh> | dcbdan: an image like that may seem intimidating, that's for sure |
| 2021-04-08 21:21:39 | → | ddellaco_ joins (~ddellacos@ool-44c73afa.dyn.optonline.net) |
| 2021-04-08 21:21:43 | → | pera joins (~pera@unaffiliated/pera) |
| 2021-04-08 21:22:34 | → | nckx joins (~nckx@tobias.gr) |
| 2021-04-08 21:23:20 | <koala_man> | . o O (How do they expect me to find a specific image in that long p..oh I see) |
| 2021-04-08 21:23:21 | <minoru_shiraeesh> | here is a video that shows an example |
| 2021-04-08 21:23:23 | <minoru_shiraeesh> | Screencast: The Haskell heap and the infinite list of primes |
| 2021-04-08 21:23:28 | <minoru_shiraeesh> | https://youtu.be/UPy7TXgrK1A |
| 2021-04-08 21:24:16 | <minoru_shiraeesh> | *an example of how to interpret images in ghc-vis |
| 2021-04-08 21:25:18 | × | Pickchea quits (~private@unaffiliated/pickchea) (Quit: Leaving) |
| 2021-04-08 21:27:03 | → | fiedlr joins (~fiedlr@83.148.33.254) |
| 2021-04-08 21:27:26 | → | ixlun joins (~matthew@213.205.241.25) |
| 2021-04-08 21:29:02 | → | pfurla_ joins (~pfurla@24.46.210.226) |
| 2021-04-08 21:29:09 | × | cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Quit: leaving) |
| 2021-04-08 21:31:26 | × | michalz quits (~user@185.246.204.43) (Remote host closed the connection) |
| 2021-04-08 21:32:05 | <dcbdan> | that's pretty neat. I assume ghc-vis can show Show instances |
| 2021-04-08 21:33:35 | → | chenshen joins (~chenshen@2620:10d:c090:400::5:2016) |
| 2021-04-08 21:35:17 | × | Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection) |
| 2021-04-08 21:36:41 | → | justsomeguy joins (~justsomeg@unaffiliated/--/x-3805311) |
| 2021-04-08 21:38:29 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 2021-04-08 21:38:51 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 268 seconds) |
| 2021-04-08 21:38:51 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 2021-04-08 21:39:08 | × | LKoen quits (~LKoen@65.250.88.92.rev.sfr.net) (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”) |
| 2021-04-08 21:39:31 | × | nut quits (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 248 seconds) |
| 2021-04-08 21:41:23 | → | dycan joins (~dycan@101-137-245-60.mobile.dynamic.aptg.com.tw) |
| 2021-04-08 21:42:45 | × | ixlun quits (~matthew@213.205.241.25) (Ping timeout: 252 seconds) |
| 2021-04-08 21:43:46 | × | Kaiepi quits (~Kaiepi@47.54.252.148) (Remote host closed the connection) |
| 2021-04-08 21:43:57 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 260 seconds) |
| 2021-04-08 21:46:18 | × | is_null quits (~jpic@pdpc/supporter/professional/is-null) (Ping timeout: 240 seconds) |
| 2021-04-08 21:48:36 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 2021-04-08 21:55:16 | → | lawt joins (~lawt@c-73-151-3-92.hsd1.ca.comcast.net) |
| 2021-04-08 21:55:38 | × | neiluj quits (~jco@unaffiliated/neiluj) (Ping timeout: 260 seconds) |
| 2021-04-08 21:57:09 | × | ddellaco_ quits (~ddellacos@ool-44c73afa.dyn.optonline.net) (Remote host closed the connection) |
| 2021-04-08 21:58:10 | → | ddellaco_ joins (~ddellacos@ool-44c73afa.dyn.optonline.net) |
| 2021-04-08 21:59:33 | × | hendursaga quits (~weechat@gateway/tor-sasl/hendursaga) (Ping timeout: 240 seconds) |
| 2021-04-08 21:59:44 | → | puffnfresh1 joins (~puffnfres@119-17-138-164.77118a.mel.static.aussiebb.net) |
| 2021-04-08 22:00:45 | → | hendursaga joins (~weechat@gateway/tor-sasl/hendursaga) |
| 2021-04-08 22:00:49 | × | puffnfresh1 quits (~puffnfres@119-17-138-164.77118a.mel.static.aussiebb.net) (Remote host closed the connection) |
| 2021-04-08 22:02:33 | × | ddellaco_ quits (~ddellacos@ool-44c73afa.dyn.optonline.net) (Ping timeout: 252 seconds) |
| 2021-04-08 22:04:17 | × | Feuermagier quits (~Feuermagi@213.178.26.41) (Quit: Leaving) |
| 2021-04-08 22:04:28 | → | Feuermagier joins (~Feuermagi@213.178.26.41) |
| 2021-04-08 22:05:48 | × | ericsagn1 quits (~ericsagne@2405:6580:0:5100:889c:8645:b190:195f) (Ping timeout: 258 seconds) |
| 2021-04-08 22:07:29 | × | dhouthoo quits (~dhouthoo@ptr-eitgbj2w0uu6delkbrh.18120a2.ip6.access.telenet.be) (Quit: WeeChat 3.0) |
| 2021-04-08 22:10:01 | → | molehillish joins (~molehilli@2600:8800:8d06:1800:cde4:48e7:42b3:a06c) |
| 2021-04-08 22:11:37 | → | contrebande-labs joins (~contreban@gateway/tor-sasl/contrebande-labs) |
| 2021-04-08 22:15:23 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 2021-04-08 22:17:15 | × | dinciorip quits (~dincio@5.170.122.95) (Quit: WeeChat 3.1) |
| 2021-04-08 22:17:36 | → | ericsagn1 joins (~ericsagne@2405:6580:0:5100:e26e:cf9:1dd6:9615) |
| 2021-04-08 22:19:02 | → | dinciorip joins (~dincio@5.170.122.95) |
| 2021-04-08 22:19:11 | × | pera quits (~pera@unaffiliated/pera) (Ping timeout: 240 seconds) |
| 2021-04-08 22:20:46 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 268 seconds) |
| 2021-04-08 22:21:18 | × | cantstanya quits (~chatting@gateway/tor-sasl/cantstanya) (Remote host closed the connection) |
| 2021-04-08 22:24:59 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 260 seconds) |
| 2021-04-08 22:25:00 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 2021-04-08 22:25:23 | × | elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Ping timeout: 248 seconds) |
| 2021-04-08 22:27:22 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds) |
All times are in UTC.