[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math

Search:


View post   

>> No.8097159 [View]
File: 203 KB, 640x960, malmerk.jpg [View same] [iqdb] [saucenao] [google]
8097159

>>8096875
Not sure why some aspects being inherently countable would be a counter argument..

>>8096874
You may learn about adjoint functors (and their natural transformation as polymorphic functions) to clean up your system - work out the algebraic content of the type class, so to speak - and then you've already "used" category theory in programming.

E.g. that the set
[math] (A\times B) \to X [/math]
is isomosphic
[math] A \to X^B [/math]
Namely given a function [math] u [/math], so that [math] u(a,b)\in X [/math], you may define
[math] v_u(a):= b\mapsto u(a,b) [/math], which is a function in [math] A \to X^B [/math].
and, in the other direction, given [math] v [/math] so that [math] v(a) \in X^B [/math], you may define
[math] u_v(a,b):= u(x)(y) [/math], which is a function in [math] (A\times B) \to X [/math].

In category theory, you'd see that each object b gives rise to an adjoint functor relations. Define functors with object map
[math] FA:=A\times B [/math]
[math] GX:=X^B [/math],
and the above says
[math] Hom(FA,X) [/math] is iso to [math] Hom(A,GX) [/math].

If you do this is FinSet, you proved just a relation like
x^(a·b) = (x^b)^a.

In Haskell you have both type constructors & functors and function level functions.

Let
F a := (a,b) and G x := b->x

The adjunction of hom-sets
(F a) -> x <=> a -> (G x)
i.e.
(a,b)->x <=> a -> (b -> x)
given by (Haskell code)
phi f = \a -> \b-> f (a,b)
invphi g = \pair -> g (fst pair) (snd pair)

Fix B. Then we have
G (F x) = b->(x,b)
F (G x) = (b->x,b)
define monad and comonad via
return :: x -> G (F x)
return x = \b->(x,b)
eta :: F (G x) -> x
eta (BtoX,b) = BtoX b

>> No.8024575 [View]
File: 167 KB, 640x960, 10.jpg [View same] [iqdb] [saucenao] [google]
8024575

>>8024001
In the end of my final post I mention this:
>>8022569
>As a final -- and perhaps contentious – note, try reading a summary online of Covey’s 7 Habits of Highly Successful People. It essentially contains a bunch of common sense, but you can learn a lot by employing methods like a ‘Mission Statement’ and weekly reviews. I’d recommend getting a pdf of it if you think you can learn something from it. It’s not so much a self-help book as it is a book of reminders of principles.

That's a good start, a book I've also read is Getting Things Done by David Allen. When I was starting work at an insurance firm my supervisor or mentor recommended picking it up, I did to humour him, but it's fairly helpful. The big idea behind it is to get everything written down and accounted for in appropriate folders. Make daily lists of things you want to accomplish in the morning to enforce perspective, and do a weekly review where you evaluate how you done and what you wish to do next week. A pdf is readily found online. Again, the best self-help is just a catalogue of general principles that you've forgotten about written in an encouraging style. Most of it's garbage, but I'd recommend those two books as essential to getting your shit together and getting organized if you have no idea where to start.

>> No.8013795 [View]
File: 203 KB, 640x960, malmerk.jpg [View same] [iqdb] [saucenao] [google]
8013795

The cultural factors outweigh the ones inherent to the language, I'm afraid.
Those languages with libraries and readable code make it. There's large libraries for Fortran and C, we'll never get rid of it, not in my lifetime I'm afraid. And there's python. I currently use python at my job, btw. I'm also the guy who made the Idris thread (>>8008449) and languages like that (e.g. Haskell) don't have large libraries and are hard to learn (impossible to learn for uninterested people)

>>8013759
The guy who's making Idris is also the author of Whitespace
(a language where the code consists completely of blanks and tabs, any symbols visible to people are treated as mere comments)
https://en.wikipedia.org/wiki/Whitespace_%28programming_language%29

There's a wiki that lists the esoteric languages btw., good is also LOLCODE (code in lol-speak), Shakespeare (the code is disguised as a play), Chef (the code is disguised as cooking recipy), and the two-dimensional languages
https://esolangs.org/wiki/Main_Page

Hello world:
>Romeo, a young man with a remarkable patience.
>Juliet, a likewise young woman of remarkable grace.
>Ophelia, a remarkable woman much in dispute with Hamlet.
>Hamlet, the flatterer of Andersen Insulting A/S.
>
> Act I: Hamlet's insults and flattery.
> Scene I: The insulting of Romeo.
>[Enter Hamlet and Romeo]
>Hamlet:
>You lying stupid fatherless big smelly half-witted coward! You are as
>stupid as the difference between a handsome rich brave hero and thyself!
>Speak your mind!
>You are as brave as the sum of your fat little stuffed misused dusty
>old rotten codpiece and a beautiful fair warm peaceful sunny summer's
>day. You are as healthy as the difference between the sum of the
>sweetest reddest rose and my father and yourself! Speak your mind!
>...
and it goes on for two more pages

Navigation
View posts[+24][+48][+96]