Logs: freenode/#haskell
| 2020-10-05 15:47:59 | <fog23> | (no drama, yeah right) |
| 2020-10-05 15:48:30 | <fog23> | or should all the nodes that can be refered to from some upwards knots - have these lower branches |
| 2020-10-05 15:48:35 | → | r-gt joins (63f22acf@gateway/web/cgi-irc/kiwiirc.com/ip.99.242.42.207) |
| 2020-10-05 15:48:38 | <sm[m]> | time for some prototyping ! |
| 2020-10-05 15:48:44 | <fog23> | then you would have several different paths having to have the same branches |
| 2020-10-05 15:48:57 | <fog23> | sm[m] you cant understand the human words? |
| 2020-10-05 15:49:04 | <fog23> | i dont think i can manage the types just yet |
| 2020-10-05 15:49:09 | <fog23> | still total confusion |
| 2020-10-05 15:49:15 | → | fraktor joins (~walt@129.93.191.18) |
| 2020-10-05 15:49:32 | <sm[m]> | I don't want to think to hard here (and have to go), sometimes a little tinkering helps the thinking |
| 2020-10-05 15:49:46 | × | GyroW quits (~GyroW@unaffiliated/gyrow) (Remote host closed the connection) |
| 2020-10-05 15:49:50 | <fog23> | the main question - if i can manage to phrase it is; |
| 2020-10-05 15:49:54 | <fraktor> | This might be a dumb question, but why isn't `map` defined as just `fmap` so that every monad can use `map`? |
| 2020-10-05 15:50:03 | → | GyroW joins (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) |
| 2020-10-05 15:50:03 | × | GyroW quits (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host) |
| 2020-10-05 15:50:03 | → | GyroW joins (~GyroW@unaffiliated/gyrow) |
| 2020-10-05 15:50:20 | <fog23> | do the nodes have the same branches below |
| 2020-10-05 15:50:24 | <dolio> | Because people in 1998 thought a map specialized to lists would be helpful. |
| 2020-10-05 15:50:25 | → | albert_99 joins (~Albert@p200300e5ff0b5b425d211d042df94ce7.dip0.t-ipconnect.de) |
| 2020-10-05 15:50:34 | <fog23> | that would require copying right? |
| 2020-10-05 15:50:41 | <fog23> | thats also something GADTs dont do |
| 2020-10-05 15:50:48 | × | oisdk quits (~oisdk@2001:bb6:3329:d100:1dc8:afe3:52e4:27ba) (Quit: oisdk) |
| 2020-10-05 15:50:52 | <fog23> | and then i just melt in despair |
| 2020-10-05 15:50:58 | <lortabac> | dolio: to be honest I still think so |
| 2020-10-05 15:51:52 | <fog23> | how can i ensure the downwardly referenced branches that are "common" between two paths, are references to the same thing? |
| 2020-10-05 15:52:10 | <fog23> | i think i need imperative style reference by call value name or whatever it is |
| 2020-10-05 15:52:20 | → | livvy joins (~livvy@gateway/tor-sasl/livvy) |
| 2020-10-05 15:52:38 | <fraktor> | dolio: I don't understand why that is. Was it an optimization thing? |
| 2020-10-05 15:52:55 | <dolio> | No. Teaching, I think. |
| 2020-10-05 15:53:07 | <fog23> | or nonlinear logic in GADT construction, or some other kind of unheard of language functionality |
| 2020-10-05 15:53:15 | <fog23> | maybe i should just give up |
| 2020-10-05 15:53:20 | → | Usurp joins (~Usurp@217.146.82.202) |
| 2020-10-05 15:54:29 | <dolio> | There were multiple changes like that. (++) used to be mplus. List comperehensions were generalized to monads (which you can turn on in GHC again). |
| 2020-10-05 15:54:49 | <fog23> | fraktor: turns out some languages *only* have lists. so that these were considered kind of fundamental constructions, traditionally, during language design. we have list comprehensions, also, because this is actually ubiquitous in mathematics also, with set builder notation using "lists" as the kind of natural container |
| 2020-10-05 15:54:50 | → | conal joins (~conal@64.71.133.70) |
| 2020-10-05 15:54:55 | × | albert_99 quits (~Albert@p200300e5ff0b5b425d211d042df94ce7.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
| 2020-10-05 15:54:58 | × | raehik quits (~raehik@cpc96984-rdng25-2-0-cust109.15-3.cable.virginm.net) (Ping timeout: 272 seconds) |
| 2020-10-05 15:55:38 | <fog23> | something something partial ordering - ranging over integers etc |
| 2020-10-05 15:55:38 | <dsal> | lortabac: Why do you think map specialized to lists is a good idea? |
| 2020-10-05 15:55:50 | <fog23> | total ordering* |
| 2020-10-05 15:56:10 | <fog23> | its Enum right? |
| 2020-10-05 15:56:12 | <fog23> | > [1..3] |
| 2020-10-05 15:56:15 | <lambdabot> | [1,2,3] |
| 2020-10-05 15:56:45 | <fog23> | so thats the fundamental structure of a ring |
| 2020-10-05 15:56:52 | <lortabac> | dsal: because I don't want to use overloading when I don't need it |
| 2020-10-05 15:56:57 | <fog23> | or, a ring without multiplication, whatever that is |
| 2020-10-05 15:57:04 | <fog23> | a monoid i guess |
| 2020-10-05 15:57:12 | <dsal> | > fmap succ [1..4] |
| 2020-10-05 15:57:15 | <lambdabot> | [2,3,4,5] |
| 2020-10-05 15:57:27 | <dsal> | lortabac: if map were fmap, it'd just work. |
| 2020-10-05 15:57:35 | <fog23> | hmm, i guess you need a unit as well as an identity to get enum |
| 2020-10-05 15:57:45 | <fog23> | Enum = Monoid + Unit |
| 2020-10-05 15:57:48 | → | motherfsck joins (~motherfsc@unaffiliated/motherfsck) |
| 2020-10-05 15:57:54 | <fog23> | and then thats naturally "list like" |
| 2020-10-05 15:58:22 | <fog23> | and since things like the integers are like that, we basically have lists everywhere we have monoids, which is everywhere we have things like (+) |
| 2020-10-05 15:58:31 | <fog23> | which is basically everywhere! |
| 2020-10-05 15:58:40 | <fog23> | so yeah, lists are kind of totally fundamental |
| 2020-10-05 15:58:48 | <sm[m]> | but error messages would be more confusing making the language harder for learners, right |
| 2020-10-05 15:58:50 | <tdammers> | geez, it's much simpler |
| 2020-10-05 15:59:13 | <tdammers> | lists are concrete enough that someone new to the language and FP in general can grasp the concept and understand `map` |
| 2020-10-05 15:59:28 | <fog23> | thats not why they are ubiquitous in maths though |
| 2020-10-05 15:59:33 | <tdammers> | just like natural numbers are concrete enough that someone new to basic algebra can grasp the concept of a binary operation such as addition |
| 2020-10-05 15:59:53 | <fog23> | and its because of *that*, which makes haskell good for learning |
| 2020-10-05 15:59:55 | × | sQVe quits (~sQVe@unaffiliated/sqve) (Ping timeout: 240 seconds) |
| 2020-10-05 16:00:01 | <fog23> | precisely because of [] |
| 2020-10-05 16:00:31 | → | Rudd0 joins (~Rudd0@185.189.115.103) |
| 2020-10-05 16:00:35 | <tdammers> | you can probably say that enough things are list-like to make lists a good concept to have |
| 2020-10-05 16:00:59 | <fog23> | thats why, similar to matlab, haskell is considered as a more naturally mathmatical syntax - so better for math/sci majors |
| 2020-10-05 16:01:04 | <sm[m]> | agreed! |
| 2020-10-05 16:01:16 | <fog23> | but then so are trees |
| 2020-10-05 16:01:16 | <sm[m]> | (tdammers) |
| 2020-10-05 16:01:22 | <fog23> | (obvs) |
| 2020-10-05 16:01:28 | hackage | boilerplate 0.0.1 - Generate Haskell boilerplate. https://hackage.haskell.org/package/boilerplate-0.0.1 (tseenshe) |
| 2020-10-05 16:01:49 | <fog23> | and so are graphs! but as far as i can tell no language yet supports their representation |
| 2020-10-05 16:01:56 | <lortabac> | :t fmap succ |
| 2020-10-05 16:01:58 | → | tzh joins (~tzh@2601:448:c500:5300::143b) |
| 2020-10-05 16:01:58 | <lambdabot> | (Functor f, Enum b) => f b -> f b |
| 2020-10-05 16:02:01 | <lortabac> | :t map succ |
| 2020-10-05 16:02:04 | <lambdabot> | Enum b => [b] -> [b] |
| 2020-10-05 16:02:31 | <fog23> | and if we follow, turing tape -> basic (with goto) -> imperative (without goto) -> functional (without top down evaluation) |
| 2020-10-05 16:02:32 | × | itai33[m] quits (itai33matr@gateway/shell/matrix.org/x-kkpfrvjedmohzgix) (Quit: Idle for 30+ days) |
| 2020-10-05 16:02:34 | × | phaul quits (~phaul@ruby/staff/phaul) (Ping timeout: 244 seconds) |
| 2020-10-05 16:02:42 | <fog23> | where function referencing is naturally graph like |
| 2020-10-05 16:02:47 | <fog23> | erm, tree like |
| 2020-10-05 16:02:48 | <lortabac> | dsal: the second one has a simpler signature |
| 2020-10-05 16:03:00 | <lortabac> | and plays better with inference |
| 2020-10-05 16:03:19 | <tdammers> | problem with trees, graphs and sets is that you typically have to decide on a subset of those that you want to be able to represent |
| 2020-10-05 16:03:21 | <dsal> | lortabac: You could make that argument for everything you can do with functors, monads, monoids, traversables, foldables, etc... |
| 2020-10-05 16:03:24 | <fog23> | then it seems like list -> tree -> graph, is the natural evolution of the structure of programs |
| 2020-10-05 16:03:33 | <fog23> | so we need graphs to get graphical languages |
| 2020-10-05 16:03:41 | <fog23> | (which i guess is why im working on graphs) |
| 2020-10-05 16:03:48 | <monochrom> | dsal, I think I did make that argument with foldables :) |
| 2020-10-05 16:04:10 | <dsal> | monochrom: I may have missed it. |
| 2020-10-05 16:04:15 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 2020-10-05 16:04:41 | <fog23> | well yeah, its possible to maintain the order of traversal during the algebraic construction of the graph |
| 2020-10-05 16:04:49 | <lortabac> | dsal: IMHO overloading is useful when you want generic operations over all Functors, all Foldables etc. |
| 2020-10-05 16:04:57 | × | GyroW quits (~GyroW@unaffiliated/gyrow) (Remote host closed the connection) |
| 2020-10-05 16:05:02 | <fog23> | thats what the seti/geti "structured" traversal was all about |
| 2020-10-05 16:05:03 | <monochrom> | If you show students "length :: [a] -> Int", it's very elementary and explainable with little background. If you show them "Foldable f => f a -> Int", there are like 2 or 3 new prerequisite concepts. |
| 2020-10-05 16:05:16 | → | GyroW joins (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) |
All times are in UTC.