Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 465 466 467 468 469 470 471 472 473 474 475 .. 5022
502,152 events total
2020-10-06 14:01:51 <quazimod1> if you have u0 -> u1 and u1 -> v1 then i'd get it
2020-10-06 14:01:58 <quazimod1> but bipartite graphs don't do this
2020-10-06 14:02:39 <ski> (note that the edges in an (undirected, non-multi) graph is just a binary relation on the set/type of vertices/nodes)
2020-10-06 14:02:39 <quazimod1> so then i dont understand the modelling of the 'includes the elements of both' in a bipartite graph
2020-10-06 14:03:18 <ski> for a graph, `->*' would describe paths in the graph
2020-10-06 14:03:42 <quazimod1> mmm i can maybe understand
2020-10-06 14:03:47 <quazimod1> if we have nodes in groups U & V
2020-10-06 14:03:58 <quazimod1> then you could get from v1 to v2 by going into U
2020-10-06 14:04:04 seanvert` joins (~user@177.84.244.242)
2020-10-06 14:04:11 <quazimod1> i dont see any bipartite graphs with an edge from a node in V to another node in V
2020-10-06 14:04:14 <quazimod1> is that what you mean?
2020-10-06 14:04:28 <ski> (well, i suppose i should just say directed. for undirected, you add the requirement that the relation is symmetric. another way to express it is that instead of having edges be ordered pairs, you have them be unordered pairs)
2020-10-06 14:05:11 <quazimod1> symmetric meaning goes in both directions?
2020-10-06 14:05:15 <ski> yes
2020-10-06 14:05:27 <ski> if `x -> y', then also `y -> x'
2020-10-06 14:05:32 <quazimod1> yeah ok
2020-10-06 14:05:36 × seanvert quits (~user@177.84.244.242) (Ping timeout: 272 seconds)
2020-10-06 14:05:47 <Super_Feeling> ski, no i've done a lot of python, js, go and c++.
2020-10-06 14:05:50 <quazimod1> but referring to my earlier qusetion
2020-10-06 14:05:59 <Super_Feeling> But i've no clue about fp, since i'm self taught
2020-10-06 14:06:13 × blasius quits (~blasius@4e69b241.skybroadband.com) (Ping timeout: 264 seconds)
2020-10-06 14:06:15 <ski> yea, for a bipartite graph, we'd have the additional requirement that there's no edges "inside" the two parts of the partition of the vertices
2020-10-06 14:07:11 <ski> so it's not that you get exactly a bipartite graph, if you divide your nodes into two kinds/sorts/types/sets. but it's a nice way to think about it, although you still need that extra condition about no "internal edges"
2020-10-06 14:07:33 <quazimod1> yeah see that completely threw me off
2020-10-06 14:07:56 <quazimod1> otherwise, discounting that that additional rule in bipartite graphs I can understand what you mean now
2020-10-06 14:08:12 <ski> Super_Feeling : well, learning another programming paradigm (like functional programming, or logic programming) will be a bit like learning to program all over from scratch again. it's not quite like that, but it's a good mindset to assume, when learning. you will need to unlearn things you're taking for granted
2020-10-06 14:08:12 <quazimod1> also graphs are hard & weird
2020-10-06 14:08:41 <ski> Super_Feeling : there are of course things that carry over. but it's better to set that aside, for the time being, until you got the basics under your belt
2020-10-06 14:08:42 <quazimod1> Super_Feeling: i had a huge chip on my shoulder when it came to my inadequacies re. trying to understand monads
2020-10-06 14:09:01 <quazimod1> step 1: pick up haskell & try to build something simple with it
2020-10-06 14:09:13 <quazimod1> step 2: read & watch a lot of youtube videos about FP & haskell
2020-10-06 14:09:16 <ski> Super_Feeling : do you remember how confused you were, when you learned programming initially, how the concepts didn't make sense ?
2020-10-06 14:09:23 <Super_Feeling> exactly, it's like everything we do in oop has no place here in haskell
2020-10-06 14:09:25 <quazimod1> the maths theory is an indulgence, you don't need to do it
2020-10-06 14:09:27 <Super_Feeling> yes, makes sense
2020-10-06 14:09:43 <quazimod1> Super_Feeling: everything you do in oop has no place here
2020-10-06 14:09:55 <quazimod1> lol, i guess thats true?
2020-10-06 14:10:26 <ski> yea .. for monads, i think most "monad tutorials" out there doesn't help that much (there are a few exceptions), possibly even making it harder to understand
2020-10-06 14:10:57 <quazimod1> ski: you know functor is a craaaaazy intimidating name for something that's pretty freaking simple
2020-10-06 14:11:30 <ski> the best practice, i think, is to first learn properly how the basic type system works, with type signatures, `data' types, polymorphism, parameterized `data' types, type classes .. before trying to tackle monads. also, start by learning particular monads, not by trying to grasp the general concept
2020-10-06 14:11:38 <Super_Feeling> i guess i will continue with "real world haskell"
2020-10-06 14:11:51 × mpereira quits (~mpereira@2a02:810d:f40:d96:693e:4333:5b77:9e8f) (Remote host closed the connection)
2020-10-06 14:11:59 <quazimod1> Super_Feeling: i'm not really a haskell developer, ski's forgotten more about haskell than I ever knew. But I'd say everything we do in oop kinda sucks anyway
2020-10-06 14:12:06 <maerwald> quazimod1: I have the unpopular opinion that monads give way to OOP style programming in haskell
2020-10-06 14:12:07 <quazimod1> it's post modernism for programming
2020-10-06 14:12:52 <maerwald> The main (informal) property about OOP is, imo, that it clouds control flow
2020-10-06 14:12:53 <quazimod1> Super_Feeling: just build basic stuff & work yoru way up
2020-10-06 14:13:00 <maerwald> Monads can do the same (especially transformers)
2020-10-06 14:13:01 <ski> quazimod1 : well, there are some good modularity things in OOP. but they're not exclusive to OOP. also, "objects are a poor man's closures" (there's also the reverse saying, in OOP circles, "closures are a poor man's objects" ;)
2020-10-06 14:13:36 × fendor_ quits (~fendor@t204-126.demo.tuwien.ac.at) (Remote host closed the connection)
2020-10-06 14:13:43 tzh joins (~tzh@2601:448:c500:5300::143b)
2020-10-06 14:13:56 <quazimod1> i dno man
2020-10-06 14:14:24 <ski> quazimod1 : yea. perhaps one could have called it `Container' (or something like that) instead of `Functor'. however, that term already have lots of (subtly) different connotations. sometimes it's just better to use a "new" word, that's not encumbered with lots of associations which may be inappropriate
2020-10-06 14:14:28 <Super_Feeling> okay so basically start building calculators in haskell, and work your way up lol (that's how i learned cpp)
2020-10-06 14:14:39 <quazimod1> oop feels like a group of dudes got together, started echoing each other's anthropomorphisations (or should i say objectomorphisations) and then now por Super_Feeling needs to know 'oop patters' and it still sucks to write complex or big programs
2020-10-06 14:14:45 × John20 quits (~John@82.46.59.122) (Ping timeout: 256 seconds)
2020-10-06 14:15:08 <ski> quazimod1 : furthermore, by using the established (in math) term "functor", we can (more easily) make use of existing theory and insights regarding functors
2020-10-06 14:15:22 <quazimod1> ski: not saying it's something to change, not even hinting at that
2020-10-06 14:15:23 <quazimod1> just saying
2020-10-06 14:15:27 John20 joins (~John@82.46.59.122)
2020-10-06 14:15:31 <quazimod1> how hilariously scary that word is vs what is actually happening
2020-10-06 14:16:27 <ski> but yes, i understand it can feel intimidating, to see some apparently alien jargon, that one hasn't a clue (based on commonly used terminology) what it might mean. especially if one's not used to doing that
2020-10-06 14:17:00 <quazimod1> mostly since it's not even a type of function
2020-10-06 14:17:06 <quazimod1> i hear functor i'm like
2020-10-06 14:17:09 <quazimod1> scary function
2020-10-06 14:17:12 <quazimod1> scary happenings, run
2020-10-06 14:17:30 <quazimod1> then you say 'oh yeah that data type is a functor'
2020-10-06 14:17:32 <quazimod1> lol wtf?
2020-10-06 14:17:37 Habib parts (~Habib@185.134.23.120) ()
2020-10-06 14:18:40 × nbloomf quits (~nbloomf@2600:1700:83e0:1f40:f500:dc4c:283a:a1a5) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-06 14:18:46 danso joins (~dan@107-190-41-58.cpe.teksavvy.com)
2020-10-06 14:18:47 × alp quits (~alp@2a01:e0a:58b:4920:41af:3872:fb2a:8dae) (Ping timeout: 272 seconds)
2020-10-06 14:18:56 × Super_Feeling quits (~Super_Fee@103.108.4.50) (Quit: Leaving)
2020-10-06 14:18:57 <ski> maerwald : i'm not sure about the "OOP" part, but i'd agree that sometimes we seem to reach to easily for a monad (which is basically doing imperative programming, although sometimes a very powerful form of imperative programming, and neatly separated from the rest of the language, in Haskell), rather than seek a more "declarative" (or "denotative" as conal prefers to call it) style
2020-10-06 14:19:01 <quazimod1> hey here's aweird one, suppose that you have a type that's like a ternary maybe, like Just x, Kinda x, None
2020-10-06 14:19:09 <quazimod1> that can't really be a functor can it
2020-10-06 14:19:17 <sm[m]> Super_Feeling: you may find https://code.world or
2020-10-06 14:19:17 <sm[m]> @where haskell-via-sokoban good
2020-10-06 14:19:18 <lambdabot> https://haskell-via-sokoban.nomeata.de
2020-10-06 14:19:25 × shatriff quits (~vitaliish@217.27.153.240) (Remote host closed the connection)
2020-10-06 14:20:51 <quazimod1> dumb question i guess, isuppose it could be a functor depending on semantics
2020-10-06 14:21:05 <maerwald> ski: monads are the most expressive tool and must be avoided most, as such
2020-10-06 14:21:12 <ski> quazimod1 : well, thing is, it is "a type of function" .. only, a function on the type level
2020-10-06 14:21:16 <maerwald> and for pretty practical reasons: they're slow
2020-10-06 14:21:18 <sm[m]> ack, missed them
2020-10-06 14:21:30 <quazimod1> ski: you talking about fmap?
2020-10-06 14:21:33 <ski> no
2020-10-06 14:21:36 <quazimod1> or `functor`
2020-10-06 14:21:42 <quazimod1> oh, ok new brain fart
2020-10-06 14:21:54 <ski> take `Tree'. this is a function that, given a type, produces another type
2020-10-06 14:22:02 <quazimod1> the data type maybe is a function at the type level, let me think
2020-10-06 14:22:11 <quazimod1> Yeah that's fair
2020-10-06 14:22:15 <ski> so, if we pass `Int' to `Tree', we get `Tree Int', the type of trees of `Int' (trees with elements of type `Int')
2020-10-06 14:22:17 <quazimod1> hey look at that you made me smarter
2020-10-06 14:22:27 Tops21 joins (~Tobias@dyndsl-095-033-093-242.ewe-ip-backbone.de)
2020-10-06 14:22:45 <ski> `Tree' could also be said to be a parameterized type, a "type template", an "incomplete/unsaturated type"
2020-10-06 14:22:48 <quazimod1> i hadn't really thought about it like that but yeah that's fair
2020-10-06 14:22:50 × mirrorbird quits (~psutcliff@2a00:801:2d5:9d73:ff00:6553:d451:a276) (Quit: Leaving)
2020-10-06 14:22:58 Tops22 joins (~Tobias@dyndsl-095-033-093-242.ewe-ip-backbone.de)
2020-10-06 14:23:08 spew joins (uid195861@gateway/web/irccloud.com/x-srtpfsrzrguwlscu)

All times are in UTC.