Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2020-11-11 22:23:32 fgaz joins (fgazmatrix@gateway/shell/matrix.org/x-sahnzspngbofktcq)
2020-11-11 22:23:33 wanaks[m] joins (wanaksmatr@gateway/shell/matrix.org/x-jgmlthufkunjkidw)
2020-11-11 22:23:39 jtojnar joins (jtojnarmat@gateway/shell/matrix.org/x-vqgiamgxvowxptlz)
2020-11-11 22:23:57 DeadComaGrayce[m joins (commagra1@gateway/shell/matrix.org/x-mqetgfqfsaaixhog)
2020-11-11 22:24:18 jkaye[m] joins (jkayematri@gateway/shell/matrix.org/x-cvcnmgziczthsczq)
2020-11-11 22:24:19 loprakoa[m] joins (loprakoama@gateway/shell/matrix.org/x-ucmxwprtpwrnroam)
2020-11-11 22:24:50 PotatoHatsue|T joins (berbermanm@gateway/shell/matrix.org/x-pdzgguoifsvvseqi)
2020-11-11 22:25:02 jesser[m] joins (jessermatr@gateway/shell/matrix.org/x-kpkzimqipoxyjqkx)
2020-11-11 22:25:03 ComaGrayce[m] joins (commagrays@gateway/shell/matrix.org/x-nnbisshxdkkhfidp)
2020-11-11 22:25:04 ttc joins (tomtauma1@gateway/shell/matrix.org/x-fasjiizskbulwgvs)
2020-11-11 22:25:12 PotatoHatsue joins (berbermanp@gateway/shell/matrix.org/x-etpsstufotvbopww)
2020-11-11 22:25:32 johnnyboy[m] joins (gifumatrix@gateway/shell/matrix.org/x-fmkdqdfzdofjlbwu)
2020-11-11 22:26:09 maralorn joins (maralornma@gateway/shell/matrix.org/x-ekdgqqvxvlgaehfp)
2020-11-11 22:26:35 × jonatanb quits (~jonatanb@83.24.9.26.ipv4.supernova.orange.pl) (Ping timeout: 244 seconds)
2020-11-11 22:27:23 raoul joins (~raoulhida@nomnomnomnom.co.uk)
2020-11-11 22:27:44 jeffcasavant[m] joins (jeffcasava@gateway/shell/matrix.org/x-pdkyglnyuzyuczpm)
2020-11-11 22:28:22 Noughtmare[m] joins (naughtmare@gateway/shell/matrix.org/x-uhqcqnlnghllalgm)
2020-11-11 22:28:38 × riddle00 quits (~riddle00@78-62-232-255.static.zebra.lt) (Remote host closed the connection)
2020-11-11 22:28:47 themsay[m] joins (themsaymat@gateway/shell/matrix.org/x-mdcfehwqhwbpuprk)
2020-11-11 22:30:26 × jedws quits (~jedws@101.184.175.183) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-11-11 22:31:16 × xerox_ quits (~xerox@unaffiliated/xerox) (Ping timeout: 258 seconds)
2020-11-11 22:31:39 paulk-collins joins (~paulk-col@195.206.169.184)
2020-11-11 22:33:46 mmohammadi9812 joins (~mmohammad@80.210.53.226)
2020-11-11 22:33:55 Stanley00 joins (~stanley00@unaffiliated/stanley00)
2020-11-11 22:34:44 thir joins (~thir@p200300f27f0b7e00894576386620b0d0.dip0.t-ipconnect.de)
2020-11-11 22:36:46 × solonarv quits (~solonarv@astrasbourg-653-1-156-155.w90-6.abo.wanadoo.fr) (Ping timeout: 260 seconds)
2020-11-11 22:38:38 × Stanley00 quits (~stanley00@unaffiliated/stanley00) (Ping timeout: 260 seconds)
2020-11-11 22:39:32 × thir quits (~thir@p200300f27f0b7e00894576386620b0d0.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2020-11-11 22:41:05 × leungbk quits (~user@cpe-104-33-52-83.socal.res.rr.com) (Ping timeout: 240 seconds)
2020-11-11 22:42:12 leungbk joins (~user@cpe-104-33-52-83.socal.res.rr.com)
2020-11-11 22:45:47 × asnyx quits (~asnyx@brettgilio.com) (Remote host closed the connection)
2020-11-11 22:45:47 × brettgilio quits (~brettgili@brettgilio.com) (Remote host closed the connection)
2020-11-11 22:46:55 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2020-11-11 22:47:35 <bqv> type Optic p q i j k l s t a b = p i j a b -> q k l s t
2020-11-11 22:47:38 <bqv> Oh my.
2020-11-11 22:50:04 <sm[m]> hey all. When I see "modules" discussed, as in https://www.stephendiehl.com/posts/exotic01.html, I always have a hard time understanding their essence. I know how they differ concretely from say a function, but what's the essential difference ?
2020-11-11 22:50:08 nbloomf joins (~nbloomf@2600:1700:ad14:3020:e4ec:2d0a:6536:c606)
2020-11-11 22:50:45 asnyx joins (~asnyx@brettgilio.com)
2020-11-11 22:50:53 <dminuoso> sm[m]: It's a function returning a module.
2020-11-11 22:51:44 <sm[m]> "The big idea of modules is to break code up into reusable components called modules.". That definition also works for functions, classes, files, packages
2020-11-11 22:52:15 × Amras quits (~Amras@unaffiliated/amras0000) (Remote host closed the connection)
2020-11-11 22:52:21 <dminuoso> sm[m]: Well the novelty begins when you think of a module being parametrized by a signature, or even another module.
2020-11-11 22:52:43 <sm[m]> dmininuoso: functions also can do that
2020-11-11 22:52:50 <dminuoso> No they can not
2020-11-11 22:53:06 <dminuoso> By module I mean the actual module itself.
2020-11-11 22:53:21 brettgilio joins (~brettgili@brettgilio.com)
2020-11-11 22:53:42 × asnyx quits (~asnyx@brettgilio.com) (Remote host closed the connection)
2020-11-11 22:53:42 × brettgilio quits (~brettgili@brettgilio.com) (Remote host closed the connection)
2020-11-11 22:53:53 <dminuoso> Sorry, I conflated a few things when I mentioned signatures above
2020-11-11 22:54:14 <dminuoso> Am I right in assuming you want to clarify what ML functors are about?
2020-11-11 22:54:23 <sm[m]> not at all :)
2020-11-11 22:54:42 <Axman6> bqv: you could abstract out that -> too
2020-11-11 22:55:15 Amras joins (~Amras@unaffiliated/amras0000)
2020-11-11 22:55:22 <dminuoso> Axman6: can you?
2020-11-11 22:55:31 <dminuoso> or, does that make any sense?
2020-11-11 22:55:35 cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net)
2020-11-11 22:55:52 <bqv> Optic p q i j k l s t a b = y (p i j a b) (q k l s t)
2020-11-11 22:55:57 <sm[m]> I'd like to understand whether there is something to the abstract idea of "module" that is different from say functions, classes, files, or anything else that is a way of breaking software into smaller pieces
2020-11-11 22:55:59 <Axman6> type OOptic f p q i j k l s t a b = f (p i j a b) (q k l s t)
2020-11-11 22:56:13 <Axman6> dminuoso: probably not :)
2020-11-11 22:56:37 <bqv> I'm glad I've never done anything wacky enough to require such an alphabet soup type
2020-11-11 22:56:38 <dminuoso> sm[m]: modules contain things not expressible within the language itself
2020-11-11 22:56:40 <dminuoso> sm[m]: say a type
2020-11-11 22:56:59 <bqv> (10 type parameters!)
2020-11-11 22:57:11 <dminuoso> unless you meddle with singletons or in a dependently typed language, you can't trivially parametrize some code over a type
2020-11-11 22:57:30 <sm[m]> dminuoso: I see that's a distinction in haskell, where a function can't define its own types, but not in other languages
2020-11-11 22:57:52 sm[m] imagines classes defined in a function
2020-11-11 22:58:38 <bqv> (Wait, that's illegal)
2020-11-11 22:59:00 asnyx joins (~asnyx@brettgilio.com)
2020-11-11 22:59:10 <dminuoso> sm[m]: well the point is to turn this namespace that identifiers and types occupy into first-class values, but in a third universe.
2020-11-11 22:59:32 <dminuoso> that's not just limited to haskell
2020-11-11 22:59:46 adm joins (~adm@43.229.89.44)
2020-11-11 22:59:49 <bqv> sm[m]: I always found it deeply upsetting that its possible to defun inside another function in lisps
2020-11-11 22:59:54 <dminuoso> parametrizing a module over some implementation is, often, not sensibly
2020-11-11 22:59:59 <bqv> That reminds me of that
2020-11-11 23:00:50 <bqv> Also python, I guess, but that's what you get with yolotyping
2020-11-11 23:00:51 <dminuoso> But if we consider a module as a wholesale bundle containing everything there is about an implementation - namely functions *and* types, we can use that
2020-11-11 23:02:17 jonatanb joins (~jonatanb@83.24.9.26.ipv4.supernova.orange.pl)
2020-11-11 23:02:32 × clynamen quits (~clynamen@109.116.4.71) (Ping timeout: 256 seconds)
2020-11-11 23:02:56 <sm[m]> so a module is a bag of types, values, and operations on them ?
2020-11-11 23:03:00 <dminuoso> say we have both modules M and N defining a type t to be either String or Text, along with functions `f and h` producing and consuming that type t. If we parametrize some third module over a module that exposes t, f and h, we have a sort of modularity you couldn't have achieved before
2020-11-11 23:03:29 <dminuoso> sm[m]: Id consider operations as just values.
2020-11-11 23:03:40 <dminuoso> there's also other noise in haskell like typeclasses, instance, tyfams, etc
2020-11-11 23:03:47 <dminuoso> But yes.
2020-11-11 23:03:55 <dminuoso> Fundamentally it's a bag of types and values
2020-11-11 23:04:03 <sm[m]> yes, I'm trying to think abstractly, not about haskell specifically
2020-11-11 23:04:17 × adm quits (~adm@43.229.89.44) (Ping timeout: 265 seconds)
2020-11-11 23:04:57 <dminuoso> sm[m]: Perhaps it could be useful to think of a module as a bag of *all* the things you can get from it through an import.
2020-11-11 23:05:14 <dminuoso> That is described a bit less suggestive
2020-11-11 23:05:21 × leungbk quits (~user@cpe-104-33-52-83.socal.res.rr.com) (Remote host closed the connection)
2020-11-11 23:05:22 sm[m] thinks more about the difference between modules and functions. A language could make those the same perhaps
2020-11-11 23:05:28 <dminuoso> (So it's a bag/list of "exported entities")
2020-11-11 23:05:47 sm[m] thinks about modules and objects (eg in smalltalk)
2020-11-11 23:05:53 <dminuoso> If the entities is *just* values, like say in Python or JavaScript, it becomes just a boring dictionary
2020-11-11 23:06:00 <bqv> Are we going down the reflection route
2020-11-11 23:06:03 <dminuoso> And then the notion of module is really lacking and not interesting
2020-11-11 23:06:11 × __monty__ quits (~toonn@unaffiliated/toonn) (Quit: leaving)
2020-11-11 23:06:31 sm[m] thinks about modules vs libraries
2020-11-11 23:06:33 <dminuoso> nix follows that route very heavily, where you just import more nix expressions
2020-11-11 23:06:41 <bqv> Not sure whether to make another lisp joke or switch to ruby

All times are in UTC.