nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
spew has quit [Quit: Connection closed for inactivity]
cantstanya has quit [Remote host closed the connection]
cantstanya has joined #ocaml
KindOne has joined #ocaml
madroach has quit [Ping timeout: 256 seconds]
madroach has joined #ocaml
mfp has quit [Ping timeout: 240 seconds]
mbuf has joined #ocaml
KindOne has left #ocaml [#ocaml]
noddy has quit [Quit: WeeChat 2.8]
narimiran has joined #ocaml
Serpent7776 has joined #ocaml
chripell has joined #ocaml
rgherdt has joined #ocaml
_whitelogger has joined #ocaml
ggole has joined #ocaml
clog has quit [Ping timeout: 265 seconds]
dborisog has joined #ocaml
TheLemonMan has joined #ocaml
<dborisog>
Could you please share examples of a good functional code with a strong resemblance to category theory? -- e.g. polymorphic datatypes or functions as functors or natural transformations, correspondigly.
Haudegen has joined #ocaml
eagleflo has quit [Remote host closed the connection]
amiloradovsky has joined #ocaml
schube[m] has joined #ocaml
eagleflo has joined #ocaml
jbrown has quit [Ping timeout: 272 seconds]
jbrown has joined #ocaml
<porchetta>
what does merlin use to compute the type of a symbol?
<porchetta>
Is there a library that allows me to accomplish the same?
nullcone has quit [Quit: Connection closed for inactivity]
kotrcka has joined #ocaml
mfp has joined #ocaml
<kvik>
porchetta: could be ocamlc -annot, or -bin-annot
<octachron>
Merlin uses the compiler library directly.
rgherdt has quit [Ping timeout: 265 seconds]
amiloradovsky1 has joined #ocaml
amiloradovsky has quit [Ping timeout: 256 seconds]
amiloradovsky1 is now known as amiloradovsky
kotrcka has quit [Remote host closed the connection]
amiloradovsky has quit [Ping timeout: 252 seconds]
amiloradovsky has joined #ocaml
spew has joined #ocaml
raver has quit [Read error: Connection reset by peer]
Haudegen has quit [Quit: Bin weg.]
dckc has quit [Quit: ZNC 1.6.6+deb1ubuntu0.2 - http://znc.in]
dckc has joined #ocaml
tane has joined #ocaml
dckc has quit [Ping timeout: 264 seconds]
dckc has joined #ocaml
narimiran has quit [Ping timeout: 256 seconds]
<companion_cube>
dborisog: what's the point of that? :p
<dborisog>
Going through good code is a great learning tool, yet I do not trust my judgement to differentiate good code from bad code and pay attention to the former while discarding latter.
<companion_cube>
right, but resemblance to category theory isn't related to good code :)
<dborisog>
I am partially familiar with a powerful application of Bourbaki's mathematical structures for conceptual analysis and synthesis, and it seems it is applicable to datatype aspect of design if usef in software engineering.
<simpson>
It sounds like an aesthetic question. Any lambda calculus will be tightly related to category theory automatically, and there exist hypergraph databases written by folks who either don't know or don't care that hypergraphs and categories are extremely similar structures.
<dborisog>
Bourbaki's structures are based on 'internal' view of structures of objects, while category theory is based on 'external' view. It reminds me of the notion of functions, thus I do not exclude a possibility that a similarly powerful thinking tool could be created from category theory.
<companion_cube>
to be frank, OCaml code is not purely functional code, and types are only an approximation of what the program does.
<companion_cube>
software engineering really isn't CT, except maybe in some esoteric Haskell circles
<dborisog>
Thus, answering your question, companion_cube, I would like to have examples of good code I can associate to categorical concepts.
<simpson>
Also, to be frank from the other side, category theory is a descriptive tool for unifying concepts, not a prescriptive tool for design guidelines. (Other than the meta-pattern of "if it looks like a generic algebraic signature, then maybe it's an algebraic object")
<companion_cube>
dborisog: if you want to see good functional APIs, maybe look at `cmdliner`? it's an applicative argument parser
<dborisog>
companion_cube: unless you know Russian I cannot provide reference materials about application of Bourbaki's structures for conceptual analysis and synthesis. It is based on similarly abstract math yet it is very powerful tool.
<simpson>
(I grok CT, mostly to cut through Haskeller memes but also because I wanted to be sure it wasn't really a magic panacea.)
<companion_cube>
simpson: good for you :D
<companion_cube>
I stick to simple algebra and logic
<dborisog>
thank you
<simpson>
companion_cube: I wish. It seems mostly just to bring me onto the losing sides of arguments on the Internet~
<companion_cube>
heh at least you get the intellectual honesty
<notnotdan>
dborisog: right, but "applied category theory" is not the same thing as programming patterns inspired by CT
<dborisog>
In my understanding, "applied category theory" is a category theory applied to a knowledge domain, in other words, used for representation of knowledge and tools of this knowledge domain. Within this schema, category-theory-for-programming is an element or a subset of elements of applied category theory.
<simpson>
Understandable. What makes this tough is that programming can be looked at as an application of linguistics and mathematics to a knowledge domain. So the category-theoretic concepts are everywhere: In parsers and compilers and data transformations.
raver has quit [Remote host closed the connection]
<dborisog>
I yet to think through the following example to something appliecable, but if I would design an information system that works with (chicken) eggs, I could use the categorical concept Product for representation of an egg with its yolk and whites.
<companion_cube>
simpson: but how often does that bring you actual useful things?
<dborisog>
An egg becomes a semantically rich algebraic data structure. I do not know what to do with it yet ( :D ), but it is an example of a construct that is native to OCaml.
<simpson>
companion_cube: I'm not sure; there's a lot of possible things and I haven't tried many of them yet. Monoids seem *unbelievably* useful. Groups show up in cryptography. The rest, meh, yeah, it's all case-by-case and hit-or-miss.
<companion_cube>
monoids are useful, but hardly need CT
<companion_cube>
it's such a simple algebraic structure
<dborisog>
dash: no, I have a diagram for it, but not sure how can I share it here )
<dash>
well, the ologs paper talks about spiderwebs, right
<dash>
i guess eggs are just as fair a target
<dborisog>
dash: originally, I created a Russian version with funny names of functions like "squeeze the yolk" )
<dborisog>
companion_cube: in my current "understanding", CT becomes a useful to software engineering if one starts thinking categories at the end designing concise and semantically rich data types operated by a polymorphic functions -- the minimum number of functions to fully process a holistic software for a knowledge domain.
<notnotdan>
dborisog: it's just that the phrase 'Applied Category Theory' refers to a specific strain of research
<notnotdan>
to be honest i am still not sure what are you looking for
<notnotdan>
it's hard for me to judge what you are talking about but have you looked at Curry-Howard correspondence for example? or categorical semantics of programmign languages in general?
<dborisog>
notnotdan: I read about Curry-Howard (and Lambek, for category theory) isomorphis yet I need a considerable way to go for it to become native to me. As for the thing I want to do with CT...
chripell has quit [Remote host closed the connection]
<dborisog>
It has several groups of descriptors, and if you would look at fats & fatty acids section, you'll see that another few levels of hierarchy. egg--fats--monosaturated--14:01; as well as aggregators like "total trans fatty acids". If I would to design and develop software for USDA (the source of this data), I would like to write a minimal number of functions possible, so if needed, I can logically proove that functions have no errors in design and
<dborisog>
implementations. For example, use the same function to count the volume of 14:01 per one egg, total fast per one egg, total vitamin A per ten yolks.
<dborisog>
Or compare a chicken egg to duck egg for a fatty acid, stuff like that.
chripell_ has quit [Ping timeout: 256 seconds]
Haudegen has quit [Quit: Bin weg.]
smazga has joined #ocaml
smazga has quit [Client Quit]
raver has joined #ocaml
sz0 has joined #ocaml
sagax has quit [Ping timeout: 240 seconds]
mbuf has quit [Quit: Leaving]
Haudegen has joined #ocaml
chripell has joined #ocaml
chripell has quit [Client Quit]
chripell has joined #ocaml
narimiran has joined #ocaml
gareppa has joined #ocaml
rgherdt has joined #ocaml
gareppa has quit [Remote host closed the connection]
dborisog has quit [Ping timeout: 258 seconds]
chripell has quit [Ping timeout: 256 seconds]
amiloradovsky has quit [Remote host closed the connection]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
amiloradovsky has joined #ocaml
ygrek_ has quit [Remote host closed the connection]