Live data from Hacker News

A Brief Guide to a Few Algebraic Structures

argumatronic.com

31–40 of 48 posts

Re: A Brief Guide to a Few Algebraic Structures

#31

Oh wow, this looks great. I had started working on my own FP glossary, but this has a ton of information and is clear enough that I'm sure many will find it very very helpful.

It is very clearly written. Never really done algebra, but after this , it start to make sense.

Re: A Brief Guide to a Few Algebraic Structures

#32

I'm learning category theory to understand haskell better. I'm finding category theory to be almost a theory about program structure in the context of composition. It's giving me a whole new perspective on one of the least concrete things about programming namely design. How relevant is abstract algebra to programming? Will it change my perspective on everything related to programming? How much of a mind bender is it…

Any references you would like to share ?

Not the OP, but this is a great book to get started:

https://github.com/hmemcpy/milewski-ctfp-pdf

Re: A Brief Guide to a Few Algebraic Structures

#33
post #18
post #13

Is there a good textbook that covers these? I am primarily interested in a computer science perspective to these algebraic structures.

My favourite abstract algebra textbook is Fraleigh's A First Course in Abstract Algebra . Unlike the article here, which just dumps you a bunch of definitions, the book introduces each structure with proper motivation. It's not a CS approach though. https://www.amazon.com/First-Course-Abstract-Algebra-7th/dp/... (the 1-star reviews apply to the Kindle version, not the contents. Just get the paperback and you'll be fi…

Wow, if the kindle edition looks anything like the preview, I understand the 1-star reviews - it's not just bad, it's a travesty. The pages aren't even in order, and some of the diagrams are missing.

Re: A Brief Guide to a Few Algebraic Structures

#34
post #3

> Rng I really think names without a fairly obvious way of saying them out-loud should just be avoided/deprecated. I can't pronounce this as "ring" (because then you'd think I was referring to a ring, not a rng). Do I just spell it out? R-N-G? I'd rather just call it a non-unital ring. That involves more letters but is much more descriptive (to a mathematician, anyway).

> I really think names without a fairly obvious way of saying them out-loud should just be avoided/deprecated. I can't pronounce this as "ring" (because then you'd think I was referring to a ring, not a rng).

But 'nearring' doesn't bother you? If I'm at a talk on rngs where the distinction from rings is important, then I'll know that's the kind of talk that I'm attending, and hear accordingly; or else the speaker will make a huge deal of it (and then probably not use the word).

Re: A Brief Guide to a Few Algebraic Structures

#35
post #30

I'm learning category theory to understand haskell better. I'm finding category theory to be almost a theory about program structure in the context of composition. It's giving me a whole new perspective on one of the least concrete things about programming namely design. How relevant is abstract algebra to programming? Will it change my perspective on everything related to programming? How much of a mind bender is it…

> I'm learning category theory to understand haskell better. I would consider myself a fairly expert Haskell programmer and I have (for fun/curiousity) spend some time reading up on/studying category theory and I can say, without a doubt or hesitation that if your goal is to either 1) understand Haskell better and/or 2) become better at writing Haskell, then studying category is a MAJOR waste of your time. I would ad…

ugh, I see HN bollocksed my list and I can't edit it to fix it, so repeated for readability:

- Type theory (Benjamin Pierce's "Types and Programming Languages" is the de facto introduction to this. It covers everything from untyped lambda calculus to things way more complex than standard Haskell, including example implementations of type checker, etc.)

- Computer assisted proofs/formal verification of programs (the Software Foundations book series, co-authored by Pierce are a good (and free!) intro: https://softwarefoundations.cis.upenn.edu/)

- The Spineless Tagless G-machine (if you are a more low level/C minded person, this talks about how we compile a lazy functiona language like Haskell to an Intel CPU: http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.53.37...)

- The Typeclassopedia (which talks about how various CT inspired classes relate to each other and their laws: https://wiki.haskell.org/Typeclassopedia)

Re: A Brief Guide to a Few Algebraic Structures

#36
post #30

I'm learning category theory to understand haskell better. I'm finding category theory to be almost a theory about program structure in the context of composition. It's giving me a whole new perspective on one of the least concrete things about programming namely design. How relevant is abstract algebra to programming? Will it change my perspective on everything related to programming? How much of a mind bender is it…

> I'm learning category theory to understand haskell better. I would consider myself a fairly expert Haskell programmer and I have (for fun/curiousity) spend some time reading up on/studying category theory and I can say, without a doubt or hesitation that if your goal is to either 1) understand Haskell better and/or 2) become better at writing Haskell, then studying category is a MAJOR waste of your time. I would ad…

Your insight is valuable and interesting. I'm certainly not an expert on Haskell and I'll take a look at your book recommendations. Thank you.

I have to say though I can't agree with you on category theory yet. Especially the part about functors. The fmap for the functor f looks to me to be 100 percent the definition of the morhphism that maps arbitrary categories to the morphisms in functor f. The resource I am reading on category theory makes it seem highly relevant to Haskell and software design in general. I'm curious as to your opinion on why the functor in Haskell only has a passing relationship to functors in category theory.

Re: A Brief Guide to a Few Algebraic Structures

#37
I really like this, but one change I'd like to see: given how many structures are defined in terms of simpler structures (which are defined in terms of yet simpler ones), it would be nice if a structure listed all of the laws, not just the ones that simpler structures don't. That way, you would have to jump around the page to get a complete picture of a single structure. Maybe have them be a different color, so you can see what is new vs. what is inherited?

Re: A Brief Guide to a Few Algebraic Structures

#38
post #37

I really like this, but one change I'd like to see: given how many structures are defined in terms of simpler structures (which are defined in terms of yet simpler ones), it would be nice if a structure listed all of the laws, not just the ones that simpler structures don't. That way, you would have to jump around the page to get a complete picture of a single structure. Maybe have them be a different color, so you c…

It's somewhat confusing to see it this way the first time, but it's absolutely the right way to think about these structures. It's better to do the work to get used to it early on.

Re: A Brief Guide to a Few Algebraic Structures

#39
post #38
post #37

I really like this, but one change I'd like to see: given how many structures are defined in terms of simpler structures (which are defined in terms of yet simpler ones), it would be nice if a structure listed all of the laws, not just the ones that simpler structures don't. That way, you would have to jump around the page to get a complete picture of a single structure. Maybe have them be a different color, so you c…

It's somewhat confusing to see it this way the first time, but it's absolutely the right way to think about these structures. It's better to do the work to get used to it early on.

It's the right way to think about the structures, sure. But when you want to look up the laws for what makes something a Ring, for instance, having them all in 1 place instead of having to jump between: Monoid, Semigroup, Group, Abelian Group, Quasiring, Nearring, and Ring. (And some of those laws occur twice, for different operators) makes it a lot more useful as a reference document.
Post reply on HN