POPULARITY
This sponsored episode features mathematician Ohad Asor discussing logical approaches to AI, focusing on the limitations of machine learning and introducing the Tau language for software development and blockchain tech. Asor argues that machine learning cannot guarantee correctness. Tau allows logical specification of software requirements, automatically creating provably correct implementations with potential to revolutionize distributed systems. The discussion highlights program synthesis, software updates, and applications in finance and governance.SPONSOR MESSAGES:***Tufa AI Labs is a brand new research lab in Zurich started by Benjamin Crouzier focussed on o-series style reasoning and AGI. They are hiring a Chief Engineer and ML engineers. Events in Zurich. Goto https://tufalabs.ai/***TRANSCRIPT + RESEARCH:https://www.dropbox.com/scl/fi/t849j6v1juk3gc15g4rsy/TAU.pdf?rlkey=hh11h2mhog3ncdbeapbzpzctc&dl=0Tau:https://tau.net/Tau Language:https://tau.ai/tau-language/Research:https://tau.net/Theories-and-Applications-of-Boolean-Algebras-0.29.pdfTOC:1. Machine Learning Foundations and Limitations [00:00:00] 1.1 Fundamental Limitations of Machine Learning and PAC Learning Theory [00:04:50] 1.2 Transductive Learning and the Three Curses of Machine Learning [00:08:57] 1.3 Language, Reality, and AI System Design [00:12:58] 1.4 Program Synthesis and Formal Verification Approaches2. Logical Programming Architecture [00:31:55] 2.1 Safe AI Development Requirements [00:32:05] 2.2 Self-Referential Language Architecture [00:32:50] 2.3 Boolean Algebra and Logical Foundations [00:37:52] 2.4 SAT Solvers and Complexity Challenges [00:44:30] 2.5 Program Synthesis and Specification [00:47:39] 2.6 Overcoming Tarski's Undefinability with Boolean Algebra [00:56:05] 2.7 Tau Language Implementation and User Control3. Blockchain-Based Software Governance [01:09:10] 3.1 User Control and Software Governance Mechanisms [01:18:27] 3.2 Tau's Blockchain Architecture and Meta-Programming Capabilities [01:21:43] 3.3 Development Status and Token Implementation [01:24:52] 3.4 Consensus Building and Opinion Mapping System [01:35:29] 3.5 Automation and Financial ApplicationsCORE REFS (more in pinned comment):[00:03:45] PAC (Probably Approximately Correct) Learning framework, Leslie Valianthttps://en.wikipedia.org/wiki/Probably_approximately_correct_learning[00:06:10] Boolean Satisfiability Problem (SAT), Varioushttps://en.wikipedia.org/wiki/Boolean_satisfiability_problem[00:13:55] Knowledge as Justified True Belief (JTB), Matthias Steuphttps://plato.stanford.edu/entries/epistemology/[00:17:50] Wittgenstein's concept of the limits of language, Ludwig Wittgensteinhttps://plato.stanford.edu/entries/wittgenstein/[00:21:25] Boolean algebras, Ohad Osorhttps://tau.net/tau-language-research/[00:26:10] The Halting Problemhttps://plato.stanford.edu/entries/turing-machine/#HaltProb[00:30:25] Alfred Tarski (1901-1983), Mario Gómez-Torrentehttps://plato.stanford.edu/entries/tarski/[00:41:50] DPLLhttps://www.cs.princeton.edu/~zkincaid/courses/fall18/readings/SATHandbook-CDCL.pdf[00:49:50] Tarski's undefinability theorem (1936), Alfred Tarskihttps://plato.stanford.edu/entries/tarski-truth/[00:51:45] Boolean Algebra mathematical foundations, J. Donald Monkhttps://plato.stanford.edu/entries/boolalg-math/[01:02:35] Belief Revision Theory and AGM Postulates, Sven Ove Hanssonhttps://plato.stanford.edu/entries/logic-belief-revision/[01:05:35] Quantifier elimination in atomless boolean algebra, H. Jerome Keislerhttps://people.math.wisc.edu/~hkeisler/random.pdf[01:08:35] Quantifier elimination in Tau language specification, Ohad Asorhttps://tau.ai/Theories-and-Applications-of-Boolean-Algebras-0.29.pdf[01:11:50] Tau Net blockchain platformhttps://tau.net/[01:19:20] Tau blockchain's innovative approach treating blockchain code itself as a contracthttps://tau.net/Whitepaper.pdf
On Friday's Black Tech Building Program. I be discussing Boolean Algebra in Computer Science and FTK Imager Demo. Later, The latest Tech News around the world. Recorded 10/4/2024 Pt. 1 Listen to pt.2 on the top of this.
This is pt.2 of the show. Recorded 10/4/2024
Today we have some extra BEAM magic for all of you! Joining us on the show is Chris Miller, who currently works as an Associate Software Engineer at Corvus Insurance. We get into a great conversation with Chris about his history with programming, his long-held interest in mathematics, and how he is trying to bring these two worlds closer together through his work. Chris weighs in with some very important expert perspectives on a range of subjects, from monads and monoids to Vim and Emacs, before we get into the different avenues of Chris' work. Along with an old college friend, Chris runs the informative YouTube Channel, Coding Cave, helps other coders through mentorship and tutoring, and is also multilingual, speaking Mandarin, Spanish, German, and English! We get some illumination on interesting and important concepts such as Turing completeness, programming language theory, and more, all delivered with an accessibility that belies the high level of the material. So for all this, plus our bonus mini-segment with Semsee employee, Sidney Leatherwood, at the end, be sure to listen in today! Key Points From This Episode: The story behind Chris' Twitter handle and his admiration for Leonhard Euler! How Chris is bringing his love of math into his programming work. A crash course on monads and monoids! Chris' teaching and tutoring work and his aim of bringing fun examples into learning. The YouTube channel that Chris runs with an old friend, called Coding Cave. Chris' take on the Vim versus Emacs debate. How Chris learned to program from his father, and his return to it during college. Unpacking programming language theory and the idea of Turing completeness. Chris clears up the difference between computer science and mathematics. Reasons that Chris enjoys working in Elixir compared with other languages. Chris' goals for his YouTube channel and his hopes to spread advanced education. Magic and languages; a programming language theory perspective. Chris' day job as a software engineer at Corvus Insurance using Elixir and Elm. The array of languages that Chris can speak; Mandarin, German, and Spanish. The process of language acquisition and Chris' methods for learning. Why Chris believes starting with the function is the best way to learn a new programming language. The aspects of Elixir and the BEAM that have Chris the most excited at the moment! This week's mini-feature with Sidney Leatherwood and his use of Elixir in production. The comparative rating service that Semsee offers their customers. Hiring in Elixir currently; perks, challenges, and resources in the space. Links Mentioned in Today’s Episode: SmartLogic — https://smartlogic.io/ Chris Miller on Twitter — https://twitter.com/blackeuler Elixir Wizard Conference — http://smr.tl/conf-podcast Leonhard Euler — https://en.wikipedia.org/wiki/LeonhardEuler Curry–Howard Correspondence — https://en.wikipedia.org/wiki/Curry%E2%80%93Howardcorrespondence Haskell — https://www.haskell.org/ Brooklyn Zelenka — https://medium.com/@expede Coding Cave — https://www.youtube.com/channel/UCwIO8jv71cbOyEwJdrYovg Conversations with the Creator: José Valim — https://www.youtube.com/watch?v=BXpoKKkqAX4 Functor — https://en.wikipedia.org/wiki/Functor Spacemacs: Emacs advanced Kit focused on Evil — https://www.spacemacs.org/ hlissner/doom-emacs — https://github.com/hlissner/doom-emacs Turing Completeness — https://en.wikipedia.org/wiki/Turingcompleteness Cal Newport — https://www.calnewport.com/ Boolean Algebra — https://en.wikipedia.org/wiki/Booleanalgebra Clojure — https://clojure.org/ Corvus Insurance — https://www.corvusinsurance.com/ APL — https://en.wikipedia.org/wiki/APL(programming_language) Gleam - https://gleam.run/ Sidney Leatherwood on LinkedIn — https://www.linkedin.com/in/leather-s Semsee — https://semsee.com/ Special Guest: Chris Miller.
Who is Howard Bloom? And what does he have to do with the COVID pandemic? It’s hard to know where to start -- Howard is a world renowned scientist, a highly regarded intellectual, an author and lecturer on wide ranging subject matter, a frank philosopher….and swears like a broken down truck driver. Howard’s #1 principle of science - and seemingly his life - is “the truth at any price including the price of your life”. Howard has written or lectured on quantum physics, evolutionary biology, neuroscience, economics, and aerospace among other scientific disciplines. Howard has been described as "next in a lineage of seminal thinkers that includes Newton, Darwin, Einstein”. Yet science-minded Howard made a huge cultural impact managing public relations for some of the world’s biggest rock stars like Michael Jackson, Prince, Bob Marley, Bette Midler, Billy Joel, and on and on the list goes. Howard’s success was unparalleled and his future was wide open to possibilities….until his body failed his mind. Like mortals, Howard got sick with the flu, but instead of getting better in a few days, and unlike most others, he got worse. Much worse. Howard would spend the next 15 years practically bed bound, and 5 of those years he was so weak he couldn’t speak, and so sick he couldn’t have people in the same room. Howard would eventually figure out he had ME/cfs, known scientifically as myalgic encephalomyelitis, or ME -- and informally known as ‘chronic fatigue syndrome’, or CFS. ME/cfs is a complex disease that causes chronic immune and neurological dysfunction. Like millions of other people who never recovered from the flu or a viral or bacterial infection, and developed ME/cfs, Howard’s life - and his hope and dreams - would never be the same. It is well known in the medical community that some people never recover from viral infections. Many of the 2003 SARS pandemic victims did not fully recover because they developed ME/cfs, and it is beginning to appear that many of the COVID pandemic victims will also develop chronic immune and neurological problems like ME/cfs patients. The world may be facing millions more people who never recover from COVID and develop ME/cfs like Howard. In this interview, Howard shares his remarkable life, with all its highest of highs, and lowest of lows -- and tales of some of the famous people who intersected his journey through the world of rock and roll, and notable thinkers also immersed in the messy business of scientific discovery. Perhaps as unusual as his life, Howard has made a very rare and full recovery from ME/cfs by maintaining a regimen of drugs to keep his body and mind working hard -- and to find the truth at any cost. Here is part 1 of my interview with the engrossing and sublime scientist Howard Bloom, author of the newly released book “Einstein, Michael Jackson and me”.... SHOW NOTES 0:07:00 Howard Bloom says childhood was a nightmare - he grew up in Buffalo, New York, and that's a nightmare - a very pretty city, wonderful Victorian architecture with big and front lawns - but his family didn't get to that status until he was 9 years old - Howard says that for someone born with a disability of being intellectual and probably bring on the autism spectrum 0:08:00 a term that didn't exist in those days, it was a very lonely place - Howard was born in 1943, the year of the Holocaust - his father has started a small liquor store in an attempt to make a living, he was 33 years old and was drafted and sent to California - so Howard grew up without a father - his mother had to immediately take over the liquor store and abandon her maternal role 0:09:00 Howard felt like he grew up without a mother as well - his mother was incredible competent, but not good at intimate relationships - so she hired a cleaning woman, not a baby sitter - to keep him out of the way, the cleaning women would lock him in a small corridor 0:10:00 That was how Howard spent the first 3 years of his life - once his Dad came back, Howard was ecstatic, for the first time in his life he's have a family - his parents then told him that he would be having a baby brother 0:11:00 Although Howard's brother was 2nd born, he was treated as the 1st child - so they parented his brother, but Howard was left in the cold - his mother was afraid of polio so she rarely let Howard out to play with other kids, but when she did, the other kids loathed Howard - when there was somebody to beat up, or chase, or humiliate, Howard was the kid 0:12:00 The neighbourhood kids excluded and marginalized Howard - but growing up isolated for the 1st ten years turned out to be a blessing for his future 0:13:00 Howard remebers in 1st grade that the 1st kid done their work would get a gold star - Howard was always last - his teacher called Howard's mother in and said 'I think your son is mentally retarded' and should be taken for psychological testing, and his mother did that but never told him the test results - one day Howard came in 2nd last, not last, and his teacher was so pleased, she gave him a gold star - so Howard was late to learn how to read and write 0:14:00 The house Howard was born in was very small, but his father did well from the liquor store they bought a new house, next door to a Frank Lloyd Wright designed house, with a huge backyard 0:15:00 It was an isolated neighbourhood, so Howard felt just as isolated as before - but their neighbour were a man and woman who were radiologists with advanced degrees - one day the woman said, 'my kids are away at summer camp, come to my reading room and see my books' - she had all 38 Oz books, and Howard read them all that summer - this was his introduction to a virtual world of reading 0:16:00 By 4th grade Howard was reading 2 books a day, one under his desk, so he was not paying attention to the teacher at all 0:17:00 Howard's father worked long hours, while his mother worked at becoming influential in Jewish society and education so she would hang out with college educated people, who she resented because she didn't get to go to college, so there was no time for Howard - whereas his parents dotted, hovered and did all the things you'd expect a parent to do 0:18:00 When Howard was in the Boy Scouts he tried very hard to win medals by completing tasks and then getting a parent to sign a piece of paper, but Howard could not get his parents to sign - when Howard's brother started Boy Scout's their mother became a Den Mother 0:19:00 This has worked to Howard's advantage - Howard can not look at things in the normal way, and he doesn't want to - when he was about 10 years old he found another book 0:20:00 He'd never seen it before, and would never see it again - the first 2 things it said were: the truth at any price, including the price of your life - and look at things as if you've never seen them before - to prove point #1, it told the story of Gallileo, but they told it all wrong - it said Gallileo would stick to his truth even if burnt at the stake - Howard says that is wrong - Gallileo told the Pope he'd retract everything he'd ever written 0:21:00 In exchange for house arrest - but the book did not tell it that way, but Howard needed a hero at that point -- the 2nd point was about Antonie van Leeuwenhoek, 1 of the 2 men who invented the microscope - it described Leeuwenhoek looking at swamp water and seeing 'animalcules' and writing to the Royal Society 0:22:00 Look for things that are invisible to you and all those around you and bring them into the light -- those 2 rules grabbed Howard, it was his religion, and he's dedicated his life to it - but not conventional science - he's a professional outsider, to see things others don't, to ask questions that would not occur to others - that's his fucking job 0:23:00 Howard read Jack Kerouac's On The Road, and reading about the Beatniks in Time Magazine - Howard and his best friend would Time cover to cover and they tied in the magazines current events competition every year 0:24:00 Every issue there was a story obout the Beatniks - Howard thought that if he could get close to the Beatniks, he would be accepted - the his father made a hideous mistake: for summer vacation he took them on a road trip to Cape Cod and Provincetown - Howard walked into the gallery in P-town and there were a bunch of Beatniks from the West Village (New York) 0:25:00 They grabbed onto Howard and treated him like another adult - so he spent the week with them and bought a pair sandals - when he got back to Buffalo, his French teacher was so scared of him and his sandals, she put him in a walk in closet - Howard started reading about Zen and wanted to drop out of high school, getting a motorcycle and go to California - but his parents threatened to send him to lumberjack camp 0:26:00 The last thing Howard wanted was to be around a bunch of macho men - Howard got in to Reed College, same as Steve Jobs, but Howard dropped out 6 weeks before the end of the year - as he was hitchhiking and riding the rails, a group of people gathered around Howard - Time and other magazines gave that movement a name, the Hippie Movement, so Howard, with others, accidentally started the Hippie Movement 0:27:00 Howard went to Israel for a year to live on a Kibbutz - his father thought it would make a man out of him - Howard went back to NY University - but when Howard was 10 years old, his mother took him to meet the head of Buffalo University graduate physics department and were in his office for an hour - as they were leaving, the proffessor put his hand on Howard's shoulder and told his mother that she didn't have to save to pay for college, Howard would get a scholarship to any college he wanted in theoretical physics 0:28:00 They had been interpreting the effect of the doppler shift and its implactions for Big Bang, the hot topic in physics at the time - indeed, Howard had 4 fellowships when he finished NYU, but in a field that had not been named yet, neuroscience - he got Columbia U to allow him to take any medical courses he wanted so he could piece together his own education program - but at 12 years old Howard realized what fascinated him was mass human passion, he called it 'the gods inside of us' 0:29:00 Howard realized that if he went to Grad school, it would be Aushwitz for the mind - so he dropped out, and went into something he knew little about: popular culture -- Howard pivoted because the Poet in Residence told Howard... 0:30:00 ...last year I asked you to be on the editorial board of the school literary magazine and you didn't even show up, this year I'm telling you that you are the Editor - Howard was distressed, he hated literary magazines, the typeface was terrible, colors awful - you could stop an orgy by throwong a literary magazine in it 0:31:00 A friend asked him: if you could do anything with this magazine, what would it be? Howard said it would be a picture book - so he gathered a team of visual artists and poets to create an issue Washington Square Review in a 12 x 12 inch format with full color printing 0:32:00 Howard was called into a meeting about the cost of the magazine and they said we're doubling your budget for the next issue - the 2nd issue was the Sex and Death issue, but half the staff quit - when it was published, Howard got calls from Look Magazine and others including Boy's LIfe... 0:33:00 ...the Boy Scout magazine - Howard had been kicked out of the Boy Scout's for incompetence in Morse Code when he was 11 -- Howard spent 2 weeks in a mental institution because the day after he attended his only rock and roll concert, he had tried to kill himself 0:34:00 For 4 years, school had given Howard structure and purpose - his 1st semester he got 4 As and 1 B, and he was humiliated to get a B -- in his 2nd semester he also got 4 As and 1 B 0:35:00 Howard created learning techniques, and he got straight As every semester after that - but when he school ended he had no purpose, no goal - Howard thinks he was depressed since he was 5 years old - every second of every day was a living hell, a torture and work was his escape - he learned to be a workaholic when he was 14 years old - when school ended, he fell into his deep depression 0:36:00 He knew what he'd be doing in September, but had no structure for the summer - he sat staring at a big bottle of valium and that was as far as he got in his suicide attempt 0:37:00 Howard's wife called Howard's uncle, a doctor, and they had Howard committed to a mental institution - when he got out, he went to visit one of his artists, but found him, his wife and their son in an empty apartment, crying - they were broke and about to be evicted 0:38:00 Howard told him he was a great artist and that if Howard showed his artwork they could both make money - after 2 weeks of trying to see art, he'd accomplished nothing 0:39:00 Howards' wife's 1st husband was a student too - she let Howard know she was sick and tired of students as husbands and Howard would lose her if he continued 0:40:00 Howard did not want to lose his wife - remember, Howard started out at 10 interested in astrophysics and microbiology - at 12 he built his first Boolean Algebra machine - at 16 he worked at the world's largest cancer research facility 0:41:00 Howard developed a theory about the beginning and end of the universe that he later discarded, but it did predict something that came true 38 years later: dark energy - but at 12-13 years old Howard discovered one of his real passions was for 'the gods inside us' - to find the ecstactic experience and how it relates to history 0:42:00 Howard felt like psychologist William James's 1902 book, The Varities of Religious Experience', was written for him - a calling to continue James's work 0:43:00 Howard was in pursuit of the ecstatic experience - that was never going to happen at Grad School 0:44:00 So in September, instead of returning to school, he immersed himself in something he knew nothing about: popular culture - it was an opportunity to go 'into the field' and it was an obligation of Howard's as a science person 0:45:00 Science is dedicating yourself to exploring - particpant/observor science, like Margaret Meade immersing herself in another culture 0:46:00 Fast forward in Howard's life, and he starts a PR (Public Relations) firm for rock and roll and popular music - he built into the largest PR firm approaching it from a science stance he learned growing up - Howard reinvented music PR 0:47:00 Howard took a 'truth drives out lies' approach to PR, in align with science seeking truth - Howard worked with a lot of talent and turned them into superstars 0:48:00 Howard says that if you find someone who can have a positive influence on humanity, you must dedicate yourself to that - when Howard was 14 yrs old, he promised his parents he would work hard if he could go to a private school - that's where he learned to work 7 days a week 0:49:00 Constant work was the salvation for his clinical depression - it did not cure, but buffered the pain a little bit - Howard says thanks to CFS (chronic fatigue syndrome) he no longer has depression 0:50:00 Howard had heard that fighter pilots are sent into battle for 2 weeks, then get 6 weeks of rest and relaxation because their 'alarm system' is on super high when they are fighting, and if you leave the alarm system on too long, they will burnout - Howard alarm system had been on 7 days a week, 52 weeks a year - he does not like rest or relaxation, it is depressing - Howard worked for 8 years without a vacation, but arranged a 2 week vacation in Los Angeles 0:51:00 In his 30s, Howard knew his body would refuse to work unrelentlessly hard - he didn't know what form that would take, but knew it would prevent him from working so prepared to live with that - Howard and his wife lived like church mice, but took all their money and invested it in real estate 0:52:00 So the property would earn a living if Howard was too weak to work - but on March 10, 1988, Howard flew to a meeting with new clients, to meet them in their own environment 0:53:00 In spite of anticipating his body was going to break down, Howard did not let up on his workaholic ways - his 1st prinicple is the truth at any price, including the price of your life - so Howard flew to this meeting and was met at the airport and taken to Linda and Cecil's home 0:54:00 Their home was new, built like an aircraft carrier, it was unfinished, on top of a hill, surrounded by sheep - because it was March 10th, it was cold and there was no heating or furniture, so they sat on the floor for the next 5-6 hours - then got back into the jeep and 5 hours drive back to the airport - something uncharacteristic happend when he left the plane: he forgot his laptop - the next day it was obvious he was coming down a cold, so he did what he always did: work hard, walk 2.5 miles, carry on -- he was a bit sicker the next day (Sunday), but did his 2.5 miles walk 0:55:00 Howard can't even remember being at work on Monday - about noon on Tuesday he told his colleagues they had to get him out of the office immediately because soon he'd be too weak to walk upstairs - his staff literally dragged him to the car to take him home - he doesn't know how he made it upstairs to his 4th floor apartment because he was so weak - Howard was too sick to leave his bedroom for 3 months 0:56:00 Howard felt like his circuit boards had been pulled out - until all he could was stare at the ceiling - but he was blissfully content because he didn't have the energy to be depressed, or the energy to be unfulfilled or driven - Howard's wife got their daughter's friend to care give and Howard spent 3 months watching movies - often too weak to think and too weak to speak ---- PART 2 COMING NEXT WEEK ------ Connect with Howard Bloom: howardbloom.net Facebook: https://www.facebook.com/howard.bloom Be a podcast patron Support Medical Error Interviews on Patreon by becoming a Patron for $2 / month for audio versions. Premium Patrons get access to video versions of podcasts for $5 / month. Be my Guest I am always looking for guests to share their medical error experiences so we help bring awareness and make patients safer. If you are a survivor, a victim’s surviving family member, a health care worker, advocate, researcher or policy maker and you would like to share your experiences, please send me an email with a brief description: RemediesPodcast@gmail.com Need a Counsellor? Like me, many of my clients at Remedies Counseling have experienced the often devastating effects of medical error. If you need a counsellor for your experience with medical error, or living with a chronic illness(es), I offer online video counseling appointments. **For my health and life balance, I limit my number of counseling clients.** Email me to learn more or book an appointment: RemediesOnlineCounseling@gmail.com Scott Simpson: Counsellor + Patient Advocate + (former) Triathlete I am a counsellor, patient advocate, and - before I became sick and disabled - a passionate triathlete. Work hard. Train hard. Rest hard. I have been living with HIV since 1998. I was the first person living with HIV to compete at the triathlon world championships. Thanks to research and access to medications, HIV is not a problem in my life. I have been living with ME (myalgic encephalomyelitis) since 2012, and thanks in part to medical error, it is a big problem in my life. Counseling / Research I first became aware of the ubiquitousness of medical error during a decade of community based research working with the HIV Prevention Lab at Ryerson University, where I co-authored two research papers on a counseling intervention for people living with HIV, here and here. Patient participants would often report varying degrees of medical neglect, error and harms as part of their counseling sessions. Patient Advocacy I am co-founder of the ME patient advocacy non-profit Millions Missing Canada, and on the Executive Committee of the Interdisciplinary Canadian Collaborative Myalgic Encephalomyelitis Research Network. I am also a patient advisor for Health Quality Ontario’s Patient and Family Advisory Council, and member of Patients for Patient Safety Canada. Medical Error Interviews podcast and vidcast emerged to give voice to victims, witnesses and participants in this hidden epidemic so we can create change toward a safer health care system. My golden retriever Gladys is a constant source of love and joy. I hope to be well enough again one day to race triathlons again. Or even shovel the snow off the sidewalk.
Boolean algebra Welcome to the History of Computing Podcast, where we explore the history of information technology. Because understanding the past prepares us to innovate (and sometimes cope with) the future! Today we're going to talk a little about math. Or logic. Computers are just a bunch of zeroes and ones, right? Binary. They make shirts about it. You know, there are 10 types of people in the world. But where did that come from? After centuries of trying to build computing devices that could help with math using gears that had lots of slots in them, armed with tubes and then transistors, we had to come up with a simpler form of logic. And why write your own complicated math when you can borrow it and have instant converts to your cause? Technical innovations are often comprised of a lot of building blocks from different fields of scientific or scholastic studies. The 0s and 1s, which make up the flip-flop circuits computers are so famous for, are made possible by the concept that all logic can be broken down into either true or false. And so the mathematical logic that we have built trillions of dollars in industry off of began in 1847 in a book called The Mathematical Analysis of Logic, by George Boole. He would follow that up in a book called An Investigation of the Laws of Thought in 1854. He was he father of what we would later call Boolean Algebra once the science of an entire mathematical language built on true and false matured enough for Charles Sanders Peirce wrote a book called The Simplest Mathematics and had a title called Boolian Algebra with One Constant. By 1913, there were many more works with the name and it became Boolean algebra. This was right around the time that the electronic research community had first started experimenting with using vacuum tubes as flip-flop switches. So there's elementary algebra where you can have any old number with any old logical operation. Those operators can be addition, subtraction, multiplication, division, etc. But in boolean algebra the only variables available are a 0 or a 1. Later we would get abstract algebra as well, but for computing it was way simpler to just stick with those 0s and 1s and in fact, ditching the gears from the old electromechanical computing paved the way for tubes to act as flip-flop switches, and transistors to replace those. And the evolutions came. Both to the efficiency of flip-flop switches and to the increasingly complex uses for mechanical computing devices. But they hadn't all been mashed up together. So set theory and statistics were evolving. And Huntington, Jevons, Schröder, basically perfected Boolean logic, paving the way for MH Stone to provide that Boolean algebra is isomorphic to a field of sets by 1936. And so it should come as no surprise that Boolean algebra would be key to the development of basic mathematical functions used on the Berry-Attansoff computer. Remember that back then, all computing was basically used for math. Claude Shannon would help apply Boolean algebra to switching circuits. This involved binary decision diagrams for synthesizing and verifying the design of logic circuits. And so we could analyze and design circuits using algebra to define logic gates. Those gates would get smaller and faster and combined using combinational logic until we got LSI circuits and later with the automation of the design of chips, VLSI. So to put it super-simple, let's say you are trying to do some maths. First up, you convert values to bits, which are binary digits. Those binary digits would be represented as a 0 or a 1, expressed in binary algebra as . There's a substantial amount of information you can pack into those bits, with all major characters easily allowed for in a byte, which is 8 of those bits. So let's say you also map your algebraic operators using those 0s and 1s, another byte. Now you can add the number in the first byte. To do so though, you would need to basically translate the notations from classical propositional calculus to their expression in Boolean algebra, typically done in an assembler. Much, much more logic is required to apply quantifiers. And simple true values are 0 and 1 but have a one step truth table to define AND (also known as a conjunction), OR (also known as a disjunction), and NOT XOR (also known as an exclusive-or). This allows for an exponential increase in the amount of logic you can apply to a problem. The act of deceasing if the problem satisfies the ability to translate into boolean capabilities is known as the Boolean satisfiability problem or SAT. At this point though, all problems really seem solvable using some model of computation given the amount of complex circuitry we now have. So the computer interprets information the functions and sets the state of a switch based on the input. The computer then combines all those trues and false into the necessary logic and outputs an answer. Because the 0s and 1s took too much the input got moved to punch cards, and modern programming was born. These days we can also add Boolean logic into higher functions, such as running AND for google searches. So ultimately the point of this episode is to explore what exactly all those 0s and 1s are. They're complex thoughts and formulas expressed as true and false using complicated Boolean algebra to construct them. Now, there's a chance that some day we'll find something beyond a transistor. And then we can bring a much more complicated expression of thought broken down into different forms of algebra. But there's also the chance that Boolean algebra sitting on transistors or other things that are the next evolution of boolean gates or transistors is really, well, kinda' it. So from the Barry-Attansoff computer comes Colossus and then ENIAC in 1945. It wasn't obvious yet but nearly 100 years after the development of Boolean algebra, it had been combined with several other technologies to usher in the computing revolution, setting up the evolution to microprocessors and the modern computer. These days, few programmers are constrained by programming in Boolean logic. Instead, we have many more options. Although I happen to believe that understanding this fundamental building block was one of the most important aspects of studying computer science and provided an important foundation to computing in general. So thank you for listening to this episode. I'm sure algebra got ya' totally interested and that you're super-into math. But thanks for listening anyways. I'm pretty lucky to have ya'. Have a great day
Dear Hannah,It's not all about engineering with me.This podcast lesson introduces students to Artificial Intelligence by showing how Boolean Algebra (a system of symbolic logic) can be used to represent “rules” in a virtual world (a video game or simulation).Teams of 3-4 students will then build and present a virtual world by using Boolean Algebra to create a consistent set of “rules” based on propositions (statements that affirm or deny something) and implications (logical judgements based on evidence and prior observation).The 'virtual world' that I create in the lesson is one where equality is predicated on both opportunity and circumstance.Imagine that.Love,Daddy
We are familiar with algebraic laws such as multiply zero by anything, and we get zero. In this episode, we see how a Boolean expression containing a constant, a duplicated signal, or a signal being combined with its inverse will simplify...always.
In this episode, we bring together our knowledge of logic operations, truth tables, and Boolean expressions to prove some basic properties of Boolean algebra.
Truth tables and circuit diagrams fall short in many ways including their abilities to evaluate and manipulate combinational logic. By using algebraic methods to represent logic expressions, we can apply properties and identities to improve performance.
Julie Moronuki: @argumatronic | argumatronic.com Show Notes: 00:57 - Julie's Unique Origin Story Into Programming 03:47 - Good Resources vs Bad Resources for Learning Haskell 11:18 - Areas to Look at Before Taking on Haskell and Functional Programming 15:56 - Terminology 17:50 - The Haskell Pyramid 25:51 - Learning Haskell Vocabulary 28:20 - Monoid and Functor 42:06 - Advice for Someone Who May Not Be Interested in Programming Resources: Haskell Programming From First Principles (Haskell Book) Natural Language Processing (NLP) Learn You a Haskell for Great Good! Programming in Haskell by Graham Hutton Haskell: The Craft of Functional Programming by Simon Thompson Real World Haskell by Bryan O'Sullivan, John Goerzen, and Don Stewart Introduction to Functional Programming Course with Eric Meijer The Joy of Haskell Haskell eXchange 2017 - A Monoid For All Seasons Transcript: CHARLES: Hello everybody and welcome to The Frontside Podcast, Episode 83. My name is Charles Lowell, a developer here at the Frontside and your podcast host-in-training. With me today on the podcast is Elrick also. Hello Elrick. ELRICK: Hello. How you doing? CHARLES: I'm doing well. I'm glad to have you on this one. I'm glad to be doing this podcast in general. We have someone on the podcast today who I've been following for, I guess probably about two years because she published a book that has been very, very helpful to me. It's one that I recommend to a lot of people. It is learning Haskell from first principles. With us on the show is Julie Moronuki, who is co-author of that book. Thank you so much, Julie for coming. JULIE: Yes, hi! Happy to be here. It's nice to finally get to talk to you. CHARLES: Yeah. One of the reasons I wanted to have you on the podcast was because I feel as though you have one of the most unique origin stories because of programming and entering in the tech world. Most of us are curious, we either come from video games or maybe we just start fiddling with the web browser. You enter the maze from the entrance that is like hidden from all, I would say. You went straight to writing a book on Haskell, is that --? JULIE: That is what happened. In 2014 on Twitter, I met my co-author, Chris Allen and he has been trying to figure out better ways to teach people Haskell because the on-ramping, I guess of people to Haskell can be quite difficult. The materials that exist are not always accessible and people felt like they need the advanced math degrees before they can write Haskell. He was trying to figure out better ways to introduce people to it. Since I was this person who's never programmed before -- I have no background -- and then he thought, "This will be a very different experience, trying to teach Haskell to her." Because I have a linguistics background and stuff he thought, "That would be interesting too and maybe, she'd be interested eventually in doing NLP." I said, I'm not -- CHARLES: What's that? Acronym alert. JULIE: Oh, yeah. Sorry. Natural Language Processing. I said, "You know, I've never done any programming and I don't play video games and I never have had any desire to learn computer programming. I don't think I'm going to like this. I don't think this is going to last but sure, I will try," and so I did a little bit. I read a little bit of 'Learn You a Haskell for Great Good.' I've read some other things. CHARLES: This was before you guys had the idea of actually writing a book. JULIE: Yes. He had the idea of turning some of his thoughts about teaching Haskell into a book and as he would explain things to me, like the questions I had about 'Learn You a Haskell,' I'd be like, "We should write this down," and he would say, "It's so hard to write it though. It's easy when I'm explaining it to you and it's so hard to write it." Initially, it started that I was helping him at things that he was teaching me and then as we got further into the book and I started reading a lot of other Haskell stuff on my own and figuring stuff out, I was writing more and more of it. Then we were kind of equal co-authors after not too long. That's how it happened. I really didn't think that I would stick with Haskell or with programming. I'm still sometimes I'm not sure about programming. I'm not sure about this whole making software thing. But Haskell is so interesting to me that I'm still here. CHARLES: That is fantastic and it's a great story. I'm curious, when you were doing the proto-research to learning Haskell, coming from really truly first principles and having no experience of programming, what made a good resource versus a bad resource? What are the things that you gravitated towards and say, "This is really instructive." What was the tone there? JULIE: One of the major problems ahead of most of the Haskell resources that exist is they assume that you've done programming before because nobody learns Haskell as a first language so they all assume that you have done some programming before. They would make references to things that if you were a programmer, you would know what they meant but I didn't. That was one of the hardest things for me. Even 'Learn You a Haskell' does that to some extent. CHARLES: What's an example of that? JULIE: I had learned a little bit about recursion from linguistics because that's a thing in human language so I really understood recursion but most of the Haskell resources explain it to you primarily in terms of, "This will be like your loops in other languages." I'm going to be like, "I don't know what a loop is. This isn't helpful for me." There are a lot of things that I didn't understand so when people talk about Haskell as being a pure functional language, neither pure nor functional necessarily, I didn't have anything to contrast them with so they didn't necessarily make sense to me as things that make Haskell different from other languages. I didn't know what imperative programming was and people would say, "In contrast to imperative programming, functional programming does this," and I'd be like, "Okay, but I don't understand what the imperative programming way is so this contrast isn't making any sense to me and same thing with purity." There were a lot of things I had to learn, in fact about mutable state because I didn't know anything about it. I had some understanding of how computer memory works but still some of the ways that people talk about it were not obvious to me. CHARLES: Do you find that seeking out that contrast actually wasn't helpful? Is it noise since at least at the beginning, it's something you'll never do. It's like saying, "Over in France, they wear these kind of socks." Since I'm going out into the street in front of my house, I don't really care. JULIE: Right. In the beginning, it was a lot of noise and I understand why they do that because they are making the assumption that everybody who is learning Haskell has come from some other programming language, probably an imperative one so I understand why that happens but in the beginning, it was very much noise for me. I noticed a lot of Haskell resources, one of the first things they tell you is that in Haskell you can't do 'x = x + 1'. I was like, "If I'm reading this like it's mathematics, why would I think I could do that." If you come from a different programming language, you might well think that you can do that but in Haskell, we can't so making that contrast, when I didn't have that background was really just confusing for me. Now, because I teach people and most of them do have some background in an imperative language, understanding the contrast is more helpful to me but in the beginning it was just confusing and noise. When we wrote Haskell book, we tried not to make those kinds of references and like, "Let's assume that everybody is just like Julie, doesn't know a different programming language that we can contrast it with and let's try to write a book like that." CHARLES: Right. I think that's a key insight because some people would say there's a lot missing or that difference might stand out. Now, that you pointed out, I can see it but I don't think I noticed it while I was reading it. But one of the things that I like is because I also tried to learn Haskell through 'Learn You a Haskell,' and I didn't find it very helpful. I found it entertaining and it's not a knock against the authors. Some of the sketches were really cute but it was still more explaining... I don't know. It was explaining more of the how, than the why, if that makes any sense where I felt as though in your book, there were a lot more analogies to actual human experiences, using the visceral language saying, "A mono is something you can mash together or squeezed together." That really connected for me. Whereas, explaining it in terms of concatenation and laws and stuff like that. Those things seem cited to the secondary resources to the primary resource. JULIE: Yeah. I think that's kind of helpful for me too. There are different Haskell books that have, I think different things about them that are good. I forget the name of the book but Graham Hutton's book, the way he talks about recursion was really helpful to me. The way he explains recursion and of course, folds but folds are things that he's known for so those parts of that book are helpful for me. But really the best book other than my own of course, for me is Simon Thompson's. I think it's called ‘The Craft of Functional Programming' and I think it does better at explaining things just in terms of Haskell. Real World Haskell, I guess is really good. It was harder for me because I hadn't been a programmer before. I think it's got so many practical exercises that -- CHARLES: Was that the O'Reilly book by Irish gentleman whose name eludes me? JULIE: Yes, Brian O'Sullivan. It makes more sense to me now but there were things in it that are sort of programmer things. Because I'd never made software before, that were really confusing for me. But Simon Thompson's, because his book does have exercises and they were ones that I could understand and do. They were fairly self-contained. My first experience actually in writing a program that does IO was from his book and I was just so thrilled. I was like, "I got it. I did it." That was really helpful book for me but I don't see people recommend that one as often but that was probably the best one for me. CHARLES: Yeah, it's always a balance because the Real World Haskell didn't really worked for me, almost because the examples were too pragmatic or too complex and I picked this up when I was 10 years into my programming career and I struggled to follow the JSON parser example, which is parsing JSON is something that I've actually done several times in multiple languages and I still struggled with it. JULIE: Whereas for me, I don't even know what JSON is. This is not something I've ever dealt with. I know what it is now sort of, but it's still not something that I deal with very much. I was just like, "What is this? I don't even know what to do here." It wasn't quite as helpful for me. I've heard a lot of people have success with that one but I think they don't share quite the same richness of programming experience with Brian O'Sullivan. I think it's a little bit more difficult. ELRICK: These are a lot of amazing resources that I wish I knew about when I try to learn Haskell. I took an online course with, I think it's like Eric Meijer and that class was very intense. Looking back, what would you say are some areas that someone should, either start to look into before they step into the Haskell world, being that you didn't come from a programming background but connecting to dots backwards now? What would you say are some areas that people can slowly ramp up into to get into Haskell and functional programming? JULIE: When I teach people Haskell, the people who have the easiest time are people who have been writing Scala for a while and they've moved over to the FP in Scala side. When I first started Haskell, I heard a lot of people make jokes about how Scala is a gateway drug to Haskell. I think there's actually might be so truth in that because I certainly have a lot of students that were Java programmers, then they got interested in Scala because maybe Scala is better for some things than Java and then they start moving more and more over to the FP in Scala side. Those are probably the students that have, I think the easiest time making the transition to Haskell that I've had anyway. But you know, I think even JavaScript, trying to write in a more functional style and there are some resources for that and really, there's a very good tutorial about monads that uses all the code examples in JavaScript. I think a lot of the concepts that you can start to approach them from other languages. Haskell is still going to be weird in a lot of ways and another thing that works for a lot of people is going to Elm. Elm is similar to Haskell but different. I think that that has worked also for a lot of people getting them into understanding more functional programming concepts but with the much easier... The word easy is so -- ELRICK: It's like a relative term like, "Oh, this is easy." JULIE: It is. CHARLES: Easy to say, right. ELRICK: That's what I thought when I step into learning Haskell and functional programming. I was like, "How bad could it be?" JULIE: Right. Learning Haskell can be very bad. I'm not going to kid around about that. It's a shame because I don't think that it needs to be that bad but the way it's presented oftentimes, for various reasons, I think why Haskell gets presented the way it does but I don't think it needs to have it like that. The designer of Elm, whose name I'm not going to try to pronounce because I don't know how you say his last name, he really made an effort to for example, the error messages in Haskell can be very intimidating. The situation there has improved since I started learning Haskell but they can be quite intimidating and he really made an effort to make very friendly error messages, very helpful error messages. I think that it shows and then it makes a difference for people who are learning. If you start with Elm and then you do want to see what Haskell or PureScript, which is also frontend language, mostly. It compose of JavaScript but it's very Haskell-like, then from Elm, let's see if we can get a little more hardcore Haskell. I think the transition to Haskell or PureScript is easier from there. I think it does help to move in the functional direction from whatever language you're in, if you do FP in Scala or try moving to more functional JavaScript or even Elm. Then Haskell will make it more sense from there or be a little easier to approach. CHARLES: Yeah, and I definitely think that for, at least from my perspective, I've been able to take a lot of those concepts that I've learned from Haskell and then apply them, even inside Vanilla JavaScript. There are things that have become indispensable like mapping and folding and they exist in JavaScript. You can reduce arrays, which is a similar to a fold and then you can map arrays but understanding that map, the key insight for me that I got from learning Haskell is that there's a whole class of values that you can map, not just arrays. The standard JavaScript object is essentially a Functor and will get a little bit to that because for people listening what that word even means and the meta around the fact that they're all these weird words and how do I go about something I want to ask you about. But the trees can be mapped and the objects can be mapped and all of the sudden, it's like this one concept that I use so much for lists, it's available on all these different data structures and it's get me thinking like, "What other data structures can I use this operation? What are the things are Functors that I'm working with?" Really, it's changed my perspective to think about the type of the data structure, in terms of the operations. JULIE: I'm in favor of keeping the terminology that we have but just explaining it much better. That's the approach that I take but it can be very hard, especially it was your first learning Haskell. I don't know if you've seen the Haskell pyramid but to get sort of productive where you can write programs in Haskell is not a very high bar. It feels like it is when you first start but it's not really very high bar but Haskell just keeps growing and growing and getting deeper and deeper so you're always approaching new libraries that you've never seen before and you feel then you've been learning Haskell all over again because they're written in a very different style of Haskell or they have even more terminology, even more kinds of Functors that you've never heard of before or something like that so you're always approaching these things over again. It can be a very intimidating feeling and it makes a lot of people very uncomfortable and I'd say, if you like Haskell and that does make you feel uncomfortable, then you don't actually need to do that because a lot of people write Haskell very happily every day in their jobs even and don't do that. They don't mess with some of the newer, super cool libraries that have all this funky terminology and stuff. Some of them don't mess with them at all. CHARLES: But certainly, there is some concepts that are core. I'm thinking of like applicative and Functor and all these things that I'm learning about and I'm curious to hear about your experience as you climb that pyramid. What is the pyramid entailed? First of all, I'd love to hear more about it because this is actually the first time I heard about the Haskell pyramid. JULIE: Say you understand monads, then you can write really a lot of Haskell programs. Probably at some point, you will need to understand monads transformers but if you just get to the point where you understand monads pretty decently, you can write a lot of software so after that, then learning more is maybe going to improve your Haskell, maybe let you write some things that you couldn't write before but a lot of it above, not that these things are necessarily in an hierarchical progression. We cover monad transformers in a fair bit of detail in Haskell book but if you get anything beyond what's in Haskell book, one of those things that some of them are very interesting, some of them can make you much more productive but some of them are also people do them for fun to explore the space and some people love them and some people hate them. Haskell lets you do a lot of things for fun and exploring mathematics in ways that are interesting and exciting and may influence and in fact, have influenced other languages like [inaudible] in PureScript but not really necessary for basic Haskell programming. A nice thing happened while we're writing Haskell book. I was writing, I think it's chapter six, which is about type classes. I was writing that chapter and at the same time, my co-author had started writing the Monoid chapter. The type classes chapter comes in chapter six and we introduce a lot of the basic type classes: num and eq and some of those in that chapter because I do think it's important. Type classes are very special thing about Haskell so I think it's important to, at least start coming to groups at them early. Some people disagree with me about that and think they can ignore them for much longer. But at any rate, it is where it is and I felt that that was important. Maybe the real motivation for type classes, really until we started writing the Monoid chapter so he started writing that while I was working on type classes chapter and he sent me the beginnings of the Monoid chapter to look at. At first I thought, "We've got addition and multiplication and list concatenation and this just doesn't seem interesting. What is this generalization of a Monoid that I'm supposed to get from these three things? And why bother making it a type class," because additional and multiplication are already in the num type class and then list concatenation is just for list so why make this into a type class and what's that motivation there. With eq, we want a quality -- CHARLES: Is that how you pronounce 'eq?' JULIE: That's how I pronounce it because 'equal' or equality. CHARLES: Okay, so this is a type class for doing what? Making sure to being able to compare two values on the same value. JULIE: Yes and it's a weird one because for most data types, you can have an eq instance and you want probably, in a lot of cases to have that but we don't want because function is a data type in Haskell so you don't want to have an eq instance for functions and that's why equality is not implemented generally for everything. That's why it's a type class so there's no instance for functions because that's not decidable. You can't decide if two functions are equal, generally. Some functions you can but in the general terms, for datatype, you can't. CHARLES: That's actually a pretty profound statement. Proof of which is left as an exercise for the listener. JULIE: We got to the Monoid and I was like, "What is the [inaudible]," or something. It turns out that there are Monoids everywhere. There's all kinds of things that you want to, either concatenate or make a product of. Then having this as a type class and thinking of it in terms of like, "We've got this abstraction. We've got this category. We've got this algebraic structure. Now, we can look for in all these other places," because once you've named the thing, then you can talk about it and think about it in a little bit of the different way. It's like, "Now, we've got this group of addition, multiplication, list concatenation." Now, we've got an abstraction of that and we can think, "Where else can I see this pattern?" and it turns out it's all over the place. For me, that was one of our thought like, "Type classes are actually really cool and powerful and interesting thing." For me, that was when it seemed like, "The terminology is worth it because, now I want to think about finding these algebraic structures and in all these other places." CHARLES: Right and like a Monoid, it could essentially be called, if you're using a Java interface, like 'mashable togetherable' or 'concatenatable' or something like that. But there's a kind of one-to-one correspondence but it is a vocabulary that just needs to be learned. JULIE: I don't know much about category theory or anything but the other cool thing about Monoid for me was that there are almost always two because there's almost always one that's destructive or additive or concatenative and there's almost always one that is conjunctive or a product or multiplicative. It's often across product that would be the zipless Monoid that exist in base and it's a cross product of the two lists. There's almost always two, whereas when you think of Monoids in the very abstract looking category theory, it doesn't matter if it's addition or multiplication. The operation doesn't matter, whether it's addition or multiplication or concatenation or cross product because you generalize the actual operation to the extent where what it's going to produce. It doesn't matter anymore. For me, I still think of Monoids in terms of like set theory or Boolean Algebra, then that's one of the things that I think is difficult with Haskell where people talk about Monoids in terms of category theory but I think that's not very helpful for the actual programmer who has to actually deal with the two different instances like sum and products or concatenation and zipping are going to actually act different in a program. CHARLES: Right, they're going to yield a different set of values. JULIE: Yes. CHARLES: Is there a baseline vocabulary? I kind of think of it like learning a new language, right? JULIE: Yep. CHARLES: When you're learning Haskell, you're not just learning a new language. You're literally learning a new language. I could go and I could learn Japanese but it's going to be a struggle at some point. People say certain languages are hard and certain language are easy. I don't generally subscribe to that. I think that most of it is just going about and living in a place where they speak this language and you'll absorb it and it's the decision to go and live there -- that's kind of the primary one. But let's say, you're a foreigner and you're travelling to this country called Haskell that's got this strange language. Like other human languages, it's just got different names associated with different concepts and some of the concepts might even just be unique to that country. Just like when you're travelling and acquiring a human language, there's a certain level of vocabulary that you need to achieve before you can do things like buy groceries and be able to transact financial exchanges or have a conversation about the weather. What are the kind of the levels of vocabulary that you need to acquire to be operational in Haskell or I would say, even in functional programming because now that I've been exposed to this, I see it in Clojure. I actually see people doing this JavaScript and in Erlang, in Elixir and what have you. JULIE: Yeah, I don't really know how to answer this question. How to buy groceries in Haskell? CHARLES: Let me let scale that down because I had this horrible tendency to spend five minutes asking what I say is going to be single question but it's actually like 30. Let's take down the scope. When you were learning this vocabulary, at what point did you feel like you're really gaining traction? We're you really starting to connect the dots? JULIE: For me, I think when I got through Functor. It was when I felt like -- CHARLES: Functor and what comes before Functor? JULIE: Monoid. I think once you understand Monoid and Functor, then a lot of other concepts in Haskell will start falling into place because this is not obvious to everyone but I think once you really understand Monoid and once you really understand Functor, then applicatives are monoidal Functors and that's not obvious to everyone. Like I said, it's not obvious at first certainly, and monads have characteristics of both Monoid and Functor as well. Then you start saying, "There's all these other Functors. There's profunctors and bifunctors. I think once you really understand Monoid and Functor, a lot of the rest of Haskell starts falling into place and then type classes like alternative. Alternative is another kind of Monoid. We have all these other names that if you can see the general pattern of Monoids and Functors, I think to me anyway, a lot of it then just started falling into place. Applicatives to me seemed, I don't want to say obvious or simple but in traverse, it's same sort of thing so we have these other names for it -- traversable -- and I was like, "Why was it called traverse. I don't understand this word at all." But once I saw the type signature and what actually happens with what the function traverse does, I was like, "Okay, I see what's happening here." For me, those were the two big hills. Once I got through Monoid and Functor and really understood them well, then a lot of other stuff just come and fell into place for me. ELRICK: This is really interesting. How was a Monoid explained to you when you were first starting to learn Haskell? Then now, how do you explain what a Monoid is to someone that's learning Haskell? JULIE: When Monoid was first explained to me, it was the pattern of there's addition and multiplication and list concatenation so it generalize out that pattern and that was really hard for me to understand at first because list concatenation and addition are similar but multiplication is different. I was like, "What do these three things have in common?" What they have in common is that they take two values of a certain type and return another value of that type and that's the type signature of the main function, that's in the Monoid type class. But that doesn't really tell you very much. A lot of functions could do that, in theory at least. How you combine them is really what's interesting about Monoid and also what makes concatenation and addition different from multiplication. Fortunately in college, I had had a fair bit of exposure to Boolean Algebra so figuring out that like, "There's actually two basic genres or varieties of Monoid and they are disjunctive or additive or they are conjunctive or multiplicative," and figuring that out, to me I always think that Monoid should really be, maybe two different type classes, one for the additive Monoid like list concatenation and addition and things where you are adding two things like a set union. Then conjunctive, which would be this intersections or multiplication or cross products. I always think there's maybe should be two different type classes but there's not a good way to do that really in Haskell. Instead, we have this one type class and then we do this ugly business of wrapping them in different type names. CHARLES: Is that why you'll have a constructor for some so it's just a wrapper for an integer? JULIE: Yeah. CHARLES: I don't know if that's so bad. JULIE: I don't like it but -- CHARLES: Yeah. You know what? You do a lot more than I do so I'm going to take your word for it. JULIE: Yeah, that's exactly why. Sum and product are the wrappers for integers because integer doesn't have a Monoid. It has two Monoids over it. CHARLES: I see. There's lots of ways to combine integers. JULIE: Yeah and those are the two basic ones. Then because Monoids also have an identity so with semi-groups, then you get even more semi-groups for integers because you get max and min, because they don't have an identity so there's semi-groups. CHARLES: There's always risk getting down into the weeds with the vocabulary but I think that there's a message here because your answer to the question is really, "When I understood Monoid and I understood Functor," from that point on, the overhead that you had to expend to get other things was lower than the overhead that you had to expend to get those initial two things. For anyone listening, Monoid and Functor are probably opaque terms. You have no idea what the hell they mean. We've been talking about in things like that a little bit but then it's okay because they're a finite set of opaque terms and they're very achievable and once you can achieve those, then you've done 90% of the work and now, you're just combining them into interesting and novel ways. JULIE: Yes. I will say it that a lot of people do tell us about Haskell book that applicative is actually the hardest chapter in the book, not monad but applicative. CHARLES: Really? JULIE: Yeah. A lot of people do tell us that. Because that's the first time that you've taken the concept of Monoid and the concept of Functor and combining them into a new thing so then, once you've done that with applicative, then after that, really it's all downhill. CHARLES: Right. It seems like there's a couple of key insights. As you're climbing that hill, I like that analogy is like one, just understanding that there things like type classes so you've through attacking Monoid and through attacking Functor, you realize, "There is such a thing." By recognizing there is such a thing as a Functor, you recognize that there is the potential for other type classes like it. Then through combining it with Monoid, to get applicative, you can see, "I can actually compose these things into new instances of those things," and then that's either the crest of the hill or the Pandora's box, depending on which way you look at it. I think there's a hopeful message in there that if you can invest the time to learn these opaque terms and making them transparent to you, you can really, really, really lean heavily on that knowledge in going forward. JULIE: Yeah. I'm writing a new book now called 'The Joy of Haskell.' The idea of The Joy of Haskell is meant to be an intermediate book. For people who already know some Haskell but we want to make words like Functor more general, like in Haskell book we really focused on the type class called Functor when it's actually a concept from mathematics or actually originally from linguistics oddly enough but we really focused on the type class in there, rather than trying to explain what a Functors are generally. In the new book, in The Joy of Haskell, we're going to try to take a lot of these terms like Monoids and Functors and catamorphisms and all these other words that Haskell has used all the time and try to explain them generally. Then also give examples like interesting uses from different libraries and stuff like that. It'll service both, hopefully a guide to the vocabulary of the Haskell ecosystem and also some documentation and examples for libraries and things like that that are useful because these things do have uses. They do get used in interesting and exciting or terrifying -- maybe those are related -- ways. That's the goal of the new book is to try to make a guide to all of this vocabulary that Haskell use all the time. We're trying to do that. How do I explain Monoids, you asked. You've got two values of whatever type. It doesn't matter the type and in general, there would be two ways you can think of to combine them, either making a sum or a union of all the values in them or making some product of those values, if they contain multiple values or even if they only contain one. That's how I explain them now. I'm not certain that addition and multiplication are actually the best ways to start with that because addition and multiplication don't act quite like set union and intersection do. I'm actually thinking of them in terms of and this is how I explain monoids to the people now, I start from set theory and that sounds really heavy but it doesn't have to be because I think a lot of things about sets are -- CHARLES: They're very intuitive, especially if you have visuals. JULIE: They're very intuitive, for people to think about. Yes, exactly. I explain Monoid now more in terms of set union and intersection. I'm actually giving a talk in October. It's coming up in just a couple weeks at Haskell eXchange in October 12th and 13th in London and I'm giving a talk there called 'A Monoid For All Seasons' and I'm going to try to explain the theoretic motivation for Monoids and try to explain them in those terms. Semi-group is a little bit different because lacks the identity but I'll try to explain the alternative type class and monad plus this really the same thing as alternative. These things are also just Monoids so we have these different names because it's a different type class alternative but it's really just another kind of Monoid. I'm giving that talk about set theory in Monoids in October, in a couple of weeks. People keep asking me on Twitter, "What's your obsession with Monoids," because my name on Twitter is Monoid Mary so I try to explain why I love them so much. CHARLES: Actually, it's an awesome point, which I've just gotten to experience it is what you see like, "Oh, there are these abstract things," you start searching for them. A lot of times, you'll uncover them and it'd be a real timesaver. There's the thrill of unearthing it in the first place and then when you could say, "Now that I've identified this thing as a Monoid, there's so much less that I have to write." There's like less work that I have to do. It's the same reason that we write frameworks for ourselves in software. It's like, "We love Ruby on Rails because of all the work we don't have to do." Now, you have to expend a lot of energy to work with it, using Rails an example but there's lots of software frameworks. It's like, "If you can find a good persistence framework or you can find a good thing for making a library for handling HTTP requests and responses, why would you write it all by hand in the first place?" I think the thing that's exciting for me as a developer is being able to see, "Monoid is a thing. Functor is a thing and I can now actually use this and I can use it almost as a looking glass to explore the world around me. When I see something in the landscape that just leaps out through that lens is another great one." I've been on a big kick lately but being able to say, "This is going to save me so much time because of the thoughts that I don't have to think and the code that I don't have to write." I think connecting it back to the pragmatic, I certainly have become really obsessed, maybe not about Monoids but having a type class large in your mind. JULIE: I think it's a really powerful thing. Sometimes that jargon is really useful. It's useful in a sense that it like compresses a bunch of information into a single word to remember. It's like teaching my eight-year old multiplication and we were talking about like, "It's like addition," and for us adult, I'll just go ahead say, "It's associative and commutative," but showing him that you can do those things and that addition is like that too and we're talking about that and he was so excited to learn that there's this word 'commutative' that encapsulates this idea for both concepts so he doesn't have to think like, "Addition does this thing. Multiplication does this thing." He doesn't have to remember both of those things, like he just remembers, "Commutative and they're both like this." It kind of compresses that information and what you have to remember and think about. Then it does make it easier to see that pattern in other things, then we can find commutativity in other things because now we have this pattern that we can look for and we got a name for it. We can talk about it and really, there's a lot of stuff like that in Haskell where we find some pattern that we find useful or we want to be able to talk about or easily translate to a bunch of different types, not translate is quite the right word but you know what I mean, I think. Then we give it a name and we make type class for it and then it's, "Now, we find it even more place for us." CHARLES: Right. It's about thinking less, right? JULIE: Yeah. CHARLES: That's a big misconception is that it's not about thinking more, it's about thinking less. JULIE: It really is. I think it's because there's so much kind of upfront work, where you have to learn all this new stuff upfront, then people mistake that for how much work we're always doing but in Haskell it's like, "We did all this work upfront and now we're now we're not going to think about these things anymore." ELRICK: That sounds like a good title for a book, 'Learn Haskell and you will think less," but it's true. When I struggled through that online class, I came out of that just being able to pick up any functional programming language and just hit the ground running. It is definitely a plus and you will think less. JULIE: Yeah, in the long term, I think that you do. Haskell is not a perfect language. There are things that probably can be improved. CHARLES: Now, before we go, I wanted to ask you, having had this very unique on-ramp into programming, which apparently you're still not convinced about. I'm curious what it would take to actually convince you but the real question that I have is there any advice that you have for someone who does not have a stereotypical background in programming who may not think that they would find programming interesting, who might have any number of roadblocks in terms of their own conceptions about the path forward. What advice would you have for them? JULIE: I am a bit joking when I say that I'm still not sure about writing software. I don't feel like I'm good at it and I think this is really the key. There are a bunch of domains in programming that I don't personally care about. I don't want to make web apps and I have nothing but respect and admiration for people who do. To me, it's very, very hard. CHARLES: Mostly because our tools aren't the same. JULIE: Yeah and there's just so many things outside your own program, there are just so many things that you have to think about and deal with because there's the network and there's other people's computers and they might be doing in other people software and what it might be doing. It is insane so for me it's very hard. There's a lot of domains of programming that I don't care about and when I thought about programming, that's the kind of thing I would think about. I certainly knew a lot of people who are web developers or the common programming jobs, I guess. Some of them just weren't that appealing to me and I'm not interested in making games or graphics so those are the kinds of things that I thought about for programming. There are things though that I am interested in doing. I'm very interested in natural language processing and I guess that's related to machine learning. I've recently taken up an interest in things like the raft protocol, the consensus protocol. Those kinds of things interest me a lot and there's a lot of the theory that interests me. I'm reading a dissertation right now about implementing a non-strict lambda calculus, which is what Haskell is. It's a non-strict lambda calculus and this guy's dissertations are theoretically implementing a non-strict lambda calculus. To me, the theoretical side is really interesting but then I am also interested in certain kinds of software. For some reason, I have developed quite an interest in making Twitter bots. I think that the advice I would give -- I'm rambling a little bit -- to people who think they're not interested in programming so why should they learn or whatever, is just find the thing that you are interested in and there's probably a way you can make software for that and maybe that will be the thing that will get you interested. It might not be Haskell, maybe you are interested in making web apps, in which case I would say go for Elm or PureScript, obviously because I like functional programs but Haskell might not be the best first language for you in that case but find the thing that you're interested in and there probably is a way to write software to do that. There's probably something in programming that will interest you. It's such a vast field. CHARLES: All right. I really, really like that answer. ELRICK: Yeah, that's a beautiful advice. Find your domain. CHARLES: Yeah, it's bigger than you think. JULIE: It's much bigger than you think. CHARLES: And there is a place for you. Thank you so much for coming on the show, Julie. I really, really, really enjoyed our conversation. JULIE: Yes, so did I. This is a lot of fun. CHARLES: Thank you. Now, before we go, I understand that you are going to be in London, was it roughly very, very soon, you said you were giving a talk. JULIE: Yes, the 12th and 13th of October. It will be recorded for people who can't get in. It will be recorded, I believe. CHARLES: You will be talking on 'A Monoid For All Seasons.' JULIE: Yes. CHARLES: And then you've also got The Joy of Haskell book, which you're hacking away right now, right? JULIE: Yes. CHARLES: With that, thank you so much for both of you. Thank you all for listening. What's a good place for people to reach out for you? JULIE: If they're on Twitter, I'm very active on Twitter so I'm @argumatronic on Twitter and my blog is also Argumatronic and that has more contact information. CHARLES: Fantastic. We'll link to those in the show notes. For everybody else, thank you for listening. You can get in contact with us at @TheFrontside on Twitter and Contact@Frontside.io over email. We'd love to hear from you. This just in, we're running a special. If you go to our website and enter the promo code 'ELRICK20,' you can get that 20% discount on your next custom developed web application. Go check that out. Take it easy, everybody. Bye-bye. JULIE: Bye-bye.
Boolean algebra is a set of rules to describe a problem whose outcome will either be true or false. They were formulated by an English mathematician named George Boole. He's the namesake for the rules and for the boolean type in statically typed languages. Read more › The post Boolean Algebra appeared first on Complete Developer Podcast.
This week the topic was boolean algebra. We interviewed Robie Basak, who's a computer programmer at Canonical, about his work on the Ubuntu operating system, and how he and his colleagues use mathematics and mathematical thinking in order to write computer software. Show notes and more episodes via www.furthermaths.org.uk/podcasts
Learn how Boolean algebra works and find out why it's important.
Example of simplifying a Boolean expression using Boolean Algebra, with particular emphasis on using the rule (p+q)(p+r)=p+qr to help simplify an expression that otherwise would have involved extensive and time-consuming expansion of brackets.
An example of using the laws of Boolean Algebra to simplify a Boolean expression, including use of De Morgan's laws.