TrillionEuroNote has quit [Ping timeout: 246 seconds]
TrillionEuroNote has joined #ocaml
waleee has quit [Ping timeout: 260 seconds]
Serpent7776 has joined #ocaml
bartholin has joined #ocaml
gareppa has joined #ocaml
bartholin has quit [Ping timeout: 260 seconds]
bartholin has joined #ocaml
Tuplanolla has joined #ocaml
aljazmc has joined #ocaml
kakadu has joined #ocaml
kakadu has quit [Client Quit]
pieguy128 has quit [Ping timeout: 245 seconds]
perrierjouet has quit [Quit: WeeChat 4.0.2]
perrierjouet has joined #ocaml
pieguy128 has joined #ocaml
alexherbo2 has joined #ocaml
MarvelousWololo has quit [Read error: Connection reset by peer]
anpad has joined #ocaml
spip has joined #ocaml
wingsorc has quit [Ping timeout: 258 seconds]
perrierjouet has quit [Quit: WeeChat 4.0.2]
perrierjouet has joined #ocaml
MuqiuHan[m] has joined #ocaml
alexherbo2 has quit [Remote host closed the connection]
azimut has joined #ocaml
rak has quit [Quit: Segmentation fault (core recycled)]
rak has joined #ocaml
waleee has joined #ocaml
waleee has quit [Ping timeout: 244 seconds]
gareppa has quit [Quit: WeeChat 3.8]
xd1le has joined #ocaml
MarvelousWololo has joined #ocaml
ncf has joined #ocaml
ncf has left #ocaml [Fairfarren.]
darchitect has joined #ocaml
<darchitect>
hey guys, can someone please explain to me the difference between type theory and category theory as someone interested in abstract maths, but not necessarily formally educated in it (a programmer) wanting to delve deeper into type theory (using OCaml)
<darchitect>
also any book recommendations would be welcome :)
<discocaml>
<octachron> Category theory is a way to build abstraction for looking at abstract mathematics to make patterns emerge.
<discocaml>
<octachron> Type theory for programming languages is more concerned at way to build abstraction/approximation for looking at programming languages to analyze their behavior (aka make pattern emerge).
<darchitect>
discocaml: thanks ! I am going through Robert Harper's course on Programming Languages and there he mentions that a "sufficiently expressive programming language can be the basis of all mathematics". I guess that means that type theory is also used to build abstraction about maths similar to category theory (or am I missing something) ?
<discocaml>
<octachron> With the main properties analyzed by type systems being "Does that program halt?", or "Does that program crash?" or "Does that program make sense"? aka "Is that program well-behaved?"
<discocaml>
<octachron> The interpretation is more that one can use some programming language to write and prove mathematics. Which is what proof assistants (like Coq) are doing.
<darchitect>
doesn't that mean we can express any form of mathematics using type thoery (some progrmaming language) meaning we can also express category theory in type theoretic terms ?
<darchitect>
making type theory more or less the be-all-end-all ..
<darchitect>
?
<octachron>
All mathematics can be expressed with set theory, being able to express all mathematics is not really a grand statement.
<darchitect>
right..
<octachron>
This is a similar situation with the parallel lambda calculus/Turing machine: both describes the same computable universe and both can be used to describe all programs.
<darchitect>
so is category theory more "abstract/general" than type theory ? I guess what I am trying to wrap my head around is - what is highest level of abstraction I should begin my journey into "the new foundations" ?
<darchitect>
from *
<octachron>
I don't recommend for non-mathematicians to start with the highest level of abstraction available.
<octachron>
You should start with the subject that interest you the most, and that you can connect with questions that you find interesting.
<octachron>
(As a former mathematics-oriented physicist, I still find the idea of starting a mathematics journey with category theory headscratch-inducing).
<darchitect>
can we express all the ideas expressable in Category Theory in Type theoretic terms ?
<darchitect>
I am asking because it feels learning Type Theory first (from the point of someone wanting to learn more about programming langueage design) is more natural ?
<companion_cube>
Type Theory is really nice and cool, whereas category theory will turn you into a raving fanatic that mumbles about diagrams all day
<companion_cube>
(100% non subjective judgement here)
<octachron>
Category theory and type theory mostly have a different subject (with some intersection).
<octachron>
I would recommend to start with type theory if you want to be sure to learn at least a bit about programming language design.
<companion_cube>
Church's simple theory ought to be enough for everyone™
<Fardale>
companion_cube: *commutative* diagrams! Not all diagrams are equals ;-)
<companion_cube>
see, there's the good diagrams and the bad diagrams
<companion_cube>
the bad diagram, it has arrows, you see, they don't commute
<companion_cube>
the good diagram, well, it has arrows, and they don't commute, but it's a good diagram
<darchitect>
octachron: thank you! Also what do you think about starting with OCaml or Haskell first, I like Haskell's syntax, but I watched Robert Harper's lectures on PL design and he seems to be a pretty convinced opponent of it :d
<octachron>
The importance of syntax is often overestimaged in my opinion. Both are a good choice. Personally, I prefer OCaml approach in general to build things first, and the specify them after.
<darchitect>
as in -> not having function signatures ?
<octachron>
? Both OCaml and Haskell have `->` in function signatures?
<darchitect>
no no I meant "as in - is 'not having to type function signatures' what makes you like OCaml's interface spec better" ?
<octachron>
You also don't have to write down function signatures in Haskell.
<octachron>
I am more talking about the general design of the languages.
<darchitect>
are there any inherent reasons why one is better than the other for first getting into Type Theory ? (I personally like OCaml better for it's modules system and the better eco-system)
<octachron>
The differences don't matter much if you are getting into Type theory.
<companion_cube>
imho if you want to learn type theory and not just FP, just learn Coq or Lean
<companion_cube>
OCaml and Haskell are really just programming languages
<discocaml>
<._null._> If you prefer Haskell you can also go for Agda
<octachron>
(that happens to have a type system that was though for humans)
neiluj has joined #ocaml
<neiluj>
hi! do objects have a deallocation method? like Python's __dealloc__?
<companion_cube>
no, but you can use Gc.finalise
<neiluj>
nice! thanks
gareppa has joined #ocaml
neiluj has quit [Quit: WeeChat 3.8]
Serpent7776 has quit [Ping timeout: 246 seconds]
gareppa has quit [Quit: WeeChat 3.8]
Serpent7776 has joined #ocaml
<darchitect>
hey guys, I want to start writing my first programming language using OCaml, can you please point to some good textbooks to start with ?
<discocaml>
<._null._> discocaml is the name of the bridge to Discord
<darchitect>
btw I have watched this course and followed it through, I was hoping for something a bit more "intermediate" I guess, where I can apply the theory from Harper's PFPL to an actual machine with OCaml ?
bartholin has quit [Ping timeout: 260 seconds]
bartholin has joined #ocaml
Soni has quit [Ping timeout: 244 seconds]
Soni has joined #ocaml
bartholin has quit [Quit: Leaving]
John_Ivan_ has joined #ocaml
John_Ivan has quit [Ping timeout: 252 seconds]
<discocaml>
<kakadu18> @darchitect I head Appel's 'Compiling with Continuations' is good, but kind of advanced..
<discocaml>
<kakadu18> heard*
aljazmc has quit [Remote host closed the connection]