Okay, good morning. Good afternoon, everybody. I welcome you to this new conference of the Webster Geneva Global Dialogue Series. My name is Lionel Fatou, I'm an assistant professor of international relations at Webster University Geneva and the manager of the WGGD. I'm pleased and honored to welcome today Audrey Tang to discuss digital democracy. Minister Tang, thank you so much for being with us. It's a real pleasure to have you here. It's a good local time, everyone. Really happy to be here. Thank you so much. So for the few of you who do not know Audrey Tang, let me just introduce her. Audrey Tang is Taiwan's digital minister in charge of social innovation. She is known for revitalizing the computer languages Perl and Haskell, as well as building the online spreadsheet system, either Calc, in collaboration with Dan Bricklin. In the public sector, Minister Tang served on Taiwan National Development Council Open Data Committee, and the 12-year Basic Education Curriculum Committee and led the country's first EU rulemaking project. In the private sector, Minister Tang worked as a consultant with Apple on computational linguistics, with Oxford University Press on crowd lexicography, and with social text on social interaction design. In the social sector, Minister Tang actively contributes to GovZero, a community focusing on creating tools for the civil society with the call to fork the government. Now, this leads me to introduce today's topic, namely digital democracy. So democracy is based on the active participation of the people in public affairs. Now, due to the complexity of human society and the impossibility of making each and every citizen a politician, democratic regimes have developed systems of representation such as parliament and voting processes that connect people and the polity and allow the former to have a say in the management of the community. However, these systems of representation are not flawless and have engendered a democratic fatigue in many countries where citizens have lost interest in politics and have disengaged from democratic practices. Some two centuries ago, Alexi de Tocqueville asserted that one of the biggest dangers of democracies was just that political disengagement by the citizens. The rapid digitalization of societies accelerated by the COVID-19 pandemic offers opportunities for rethinking democratic governance and strengthening participatory politics. It may also ease consensus building thereby reducing the risk of a tyranny of the majority. On the other hand, digitalization poses risk to democracies from disinformation campaigns to social polarization and populist tendencies. Given her expertise and responsibilities, Minister Tang is the ideal interlocutor to work through this highly complex topic. Now, before giving the floor to Minister Tang, let me tell you a bit about the logistics of this conference. So Prime Minister Tang, sorry, not yet Prime Minister. Not yet. Not yet.  And the entire exercise will last about one hour. During the Q&A session, please, if you have questions, raise your hand with the raise your hand option. And my wonderful assistant will unmute you so that you can ask the question. Overall, please keep your microphone muted during Minister Tang's presentation. And of course, the Q&A session except if you provided the floor. Now, without further ado, let's hear from Minister Tang about Taiwan experience in and running initiatives related to digital democracy. Minister Tang, please, you have the floor. Thank you. Really happy to be here. And unlike many people working on digital and democracy, I'm a optimist in combining the two. And this strange condition began when I was 15 years old. There was 1996. I discovered that a future of human knowledge is on the Wild Web and my textbooks were all out of date. So I told my teachers I want to quit school and start my education on the Wild Web. Surprisingly, my teachers all agreed with it. A year later, I founded a startup working on web technologies and I got to join this fabulous internet community that runs with this crazy idea. And open and grassroots political system that powers the internet to this day. And today, as Taiwan's first digital minister, I'm putting into practice the ideas that I learned when I was 15 years old. And there was rough consensus, civic participation and radical transparency. Surprisingly, it's working very well. It's transforming our society. In 2016, our president, Dr. Tsai Ing-wen, said an inspiring statement in her inauguration speech. She said, before democracy was a clash between two opposing values. But now democracy must become a conversation between many diverse values. So instead of being the arbiter torn between different sides, our government now ask a very different set of questions. We would ask, what are our co-creation, our common values, despite different positions? And then we ask, given the common values, can we make civic technologies solutions that work for everyone and with everyone? And so the branch of technology, civic technology, enable millions of people to listen to each other, instead of just one person speak to millions of people. In the past couple of years, Taiwan has been consistently ranked among the best in the world in both pandemic resilience and economic growth. And this was because since 2014, we adopted digital democracies, our national direction, catalyzed, as you see here, by a occupied movement in March 2014. There was a demo, a live demo, of mass participation. We occupied the parliament peacefully, very important to note, peacefully for 22 days. At a time, the MPs in Taiwan were refusing to deliberate substantially a trade service agreement with Beijing. So we got into the parliament at night and stayed there. For three weeks, we demonstrated not as a protest, but as a demo. We demoed how to deliberate such a trade agreement with the whole society. There were over 20 NGOs participating, the Greens, Labour's, Independence, everybody. And we, the G0V-gov-zero movement, supported this deliberation process with a radically transparent broadcasting, live streaming, cable power, radio, logistic system. And G0V, as I mentioned, is a civic tech community. The call, as you've already heard, is to fork the government. Fork means in software engineering to take something that's already there, not writing it off. So we take the government websites, which all end in GOV.TW, and make better open alternatives that ends in something that G0V.TW. For example, in 2012, in the very beginning, the annual national budget was hundreds pages long in a PDF file, very hard to read. So Gov-zero's very first project was budget.G0V.TW, which showed the national budget in the same way, but everyone understands now, because you can't drill down interactively to each and every detail. Today, the system, after being forked, is now merged by many city government and also the national participation platform, joined the GOV.TW. So anyone can just look at the map, find a part of budget they care about, and type in any question they want to ask. And a career public servant actually comes forward and answers that part of the question. So it became a direct dialogue platform, not necessarily through the MPs or city councillors, but for the career public servants to communicate directly with citizens. So why are there so many civic tech people in Taiwan like me? I spoke to my clients during the Sunflower Movement, Apple, Oxford, University Press and social techs. And I said, okay, I have to take a three-week leave because democracy needs me. And I think that's because our generation, I'm 40 now, were the first generation that enjoyed freedom of speech after three decades of martial law and dictatorship. So that freedom arrived in 1989, the year of personal computers. So for us, the personal computer revolution and the freedom of speech is not two things. It's the one and same thing. The first presidential election by popular vote in 1996 was also the year that a wild wave got really popular. So for the past 30 years, when we see free software, we always think of freedom of assembly of speech and never free of cost, because we know that freedom is never free of costs. Our parents' generation, our grandparents' generation paid dearly for it, and we needed to use the software freedom to keep it free as we did during the Sunflower Movement in 2014. Now, the movement caused a peaceful revolution. There was a radical transformation of social expectations of the end of the 2014. There was a mayoral election, and all the mayors that did not support open government simply did not get elected. And the elected mayors sometime did so surprisingly without preparing an inauguration speech. So the occupiers and the civic tech people who supported them, we were then invited as reverse mentors, young people who mentor the cabinet to advise the public service to solve emerging issues such as Uber. Now, Uber is very interesting because in 2015 it started as the meme, a virus of the mind, right, called a sharing economy, which said that code dispatch cars better than laws, so we don't have to obey laws but just code or something like that. So the meme spread through apps from drivers to passengers to driver. And you can't really argue with a meme, right? You can't argue with the common flu. It's not in the same category. So there's protest, the taxi drivers surrounded the ministers' transportation. We see it around the world demanding negotiation. But how do we negotiate with a meme? For us, the solution is not through talking with the meme. It's through outmeaning them, through the deliberation that involves thousands of stakeholders to create common new memes. And it's a scaling down of the millions of people on the street we just did. So we think we can do it. Now, to think deeply about something together or deliberation is an effective vaccine against the virus of the mind. When all the passengers, drivers, academics, public servants listen to one another and form a rough, good enough consensus, we become immune to divisive PR campaigns and conspiracy theories. So we adopted the focus conversation method involving four stages. The first one is FOX, where we collect evidence, first-hand experience, objective data, open data and publish it to everyone. And after that is confirmed, we move to collect everyone's feelings about those same FOX. So you may feel upset. I may feel happy. It's all okay. And after people converge on their feelings for around three weeks that resonates with everybody, we then talk about ideas. The best ideas are the ones that address the most people's feelings. And then we simply translate those crowdsourced agenda and ideas into legalese and sign them into decisions. Now, prior to the digital web, the decision-making process was not very transparent. And people on the street would speak a very different language than people in the government. So they're not even agreeing on basic facts, let alone each other's feelings. So POLIS, the system that you see here, is a way to make sure that we have a pro-social social media instead of an anti-social corner of social media where the ideas become ideologies, polarization that blinds people to each one's views. We make sure that you see your friends and families on those clusters. And this interactive survey is crowdsourced, meaning that even the ministries do not have an idea of what are the people's feelings. So we simply ask people, how do you feel? And four groups of people soon emerge, the taxi drivers, Uber drivers, Uber passengers and other passengers. And the system then shows each group how their shared sentiments are received by other groups. And the interesting thing is simply by clicking agree to move toward me or disagree to move forward away from me, it lowers people's antagonism because you can see that people on all those clusters are your friends and families. You just didn't talk about sharing economy or gig economy over dinner, right? So at the beginning, people were on all the corners. But because we say we only give binding agenda setting power to anything that people can propose that convince all the clusters. So the participant converge our feelings that resonate not just with like-minded people, not just in the filter bubble, but across the aisle. So instead of distracting, we attracted consensus. And after we got a set of feelings that resonates with practically everybody, it's now much easier for the government to meet with all the stakeholders and check with them one by one. So we will say here is the consensus of the people on this pro-social social media. And as the Taxi Union, as Uber, do you agree? If you do agree, how do we translate that into law? So they're bound to the words that they said during the live stream consultation and all the stakeholders did agree. So Uber have been for quite a few years now a legal taxi company, the Q-taxi. When we ratified the agreement in August 2016, just one year after this consultation, everybody anticipated it. So it's a win-win solution because the local temples co-ops and so on can enjoy the same access to the laws that allows for dynamic dispatch, search pricing and so on with the common understanding that insurance registration, not undercutting existing meters are important. So our next question in 2016 is can we scale this up? So in 2016 I joined the cabinet as digital minister and to explore this possibility of scaling this not just on nationwide emerging tech issues but on everything through the public digital innovation space. We work with designers, programmers, facilitators. We focus on being assistive, automating away the chores that the facilitators were doing in order to make more room for participation. So it's not just technological contributions, the culture that we're bringing to the government. For example, I'm a radically transparent digital minister and by that I mean all the journalists, all the lobbyists, I think this is David Pluth lobbying for Uber. Everybody get to ask me questions but only publicly and it's not just for them but also for internal cross-ministerial meetings. For all the hundreds of meetings I have chaired since I became digital minister, everything was transcribed and tracked on track.pdista.tw. There was a written record or video record for everything everybody said during those meetings and we send them to participant afterward to check for 10 working days and then we just publish, relinquish, auto-copyrights. And the effect of this is very surprising because the public servants became very innovative and even risk-taking. They proposed some very good ideas under this condition and that's because previously, before radical transparency, the public service gets the blame if things go wrong and the minister always get a credit if things go right. But with this record, it flips it around. If things go right, the public servant get a credit because their name is on the transcript. But because this is voluntary, this is experimental method, if things go wrong it's always Audrey's fault. And under this condition, they became super innovative and open to a lot of interesting ideas. One of the ideas is adopting this co-creation platform straight from the free software community called Sandstorm as our public service infrastructure. We have the community tools like Git, Hack and D, Rocket Chat, precisely how the free software open source community is organizing on the open internet these days. We have a lot of interesting system actually written by young public servants like apps for ordering lunch to get her plan travels together and so on. And so it's really good to have this choice to amplify this innovation instead of having to subscribe to the system integrators or large private sector vendors to enable a free software culture within the public service. And in this spirit, we co-create a petition platform as a way for people to participate. It's like we the people platform in the U.S. But the U.S. system, as I understood it, it's offline now, when it was online, it did not receive the same level of attention as in Taiwan perhaps because for cross-ministerial issues people would just get bureaucratic answers that explains the issue rather than resolving the issue. So we ask all 32 ministries in the National Cabinet to build a team of participation offices or POs. So when people start a petition and collect 5,000 signatures, they know instead of just a dutiful response, they will actually get to meet with all the relevant ministries either in Taipei or a capital city or we travel to the rural areas and islands if they are petitioning for local development. And twice a month we would meet to resolve those issues together without exposing any public servant to risk. So after more than 100 collaborative meetings, which are all tracked here, we relieved the fear, uncertainty and doubt. For example, a petitioner in 2017 rallied. The mechanics user saying the text filing experience was, and I quote, explosively hostile to use. Instead of explaining the problem, we invited everyone who complained the loudest to just co-create the text filing system. And through this kind of co-creation, people learn they can contribute their expertise, not just as complaints, but as contributors. And by collaborating with the social sector, we're building a robust environment suitable for social innovators where the power of civil society can be brought into full play. And you're looking at a social innovation lab, my office. I personally provide my office hour at a lab every Wednesday from 10am to 10pm, well, before the pandemic, now they're also through the telecommunication. Provided that my visitor agreed to have our conversation posted online radically transparent, anyone interested in social entrepreneurship is welcome to have a discussion with me. So the different regional cities social innovators gather around me when I tour around Taiwan. I still tour around Taiwan because we've never had a lockdown. Although it's just me that travel, everybody else remain through a physical distance very safely in Taipei or other municipalities, but we provide a video conference and transcription service that make it very easy to see the local patterns surfaced and resolved in a very quick fashion and through the related ministries through their participation office and network to scale it and so that the ministries in other departments said, okay, so the way we solve the text filing system can also be used in our business like Distribute Mosque or Book Vaccines and so on. A recent example is coming up with an effective solution to contact tracing. To eliminate community transmission, contact tracing must be done in a way that makes sure we don't put ourselves into a dilemma of having to choose between protecting privacy on one hand and preventing a public health crisis on the other hand. So we see other jurisdictions rolling out mandatory government apps and we see them backfire. So instead of centralizing contact tracing data to the one-size-fits-all government site or yielding control to multinational corporations, we do neither. We saw the social sector, social entrepreneurship solutions working with the people. In May 2021, CivicTech in the GZeroVGFZero community invented this contact tracing method based on text messages. We work across sectors with telecom carriers to deploy this in just a week. By scanning the QR code with whatever camera scanner you have on your phone, the building camera, sending a toll-free text message, people can keep track of their itineraries. This allowed contact tracers to confirm the footprints of infected people and their contacts without revealing any private information to venue owners. And well, in the past two years and counting, Taiwan only had less than 1,000 casualties because we reduced contact tracing from over 24 hours to less than 24 minutes. Of course, we need to peacefully coexist with people who don't use smartphones, so handwriting and stamping is still allowed, paper-based is still allowed. And when contact tracers apply for information about those numbers, they submit the request through the platform you see here. And the phone number holder can then reverse audit the contact tracers' requests and activities. All records are, of course, deleted after 28 days. And because the Civic Tech originated from Kev Zero, who always valued data sovereignty, we respond to new challenges with timely improvements. For example, text messages sent to 1922 were discovered by a judge assessing a police search warrant a few months after the introduction. Fortunately, by encrypting the multiparty design, it prevented the police from making sense of the 15 random digits. So the judge denied the search warrant of the mapping database and publicly questioned the legality of even sending those texts to police officers in the first place. And the Ministry of Justice immediately concluded publicly that the SMS does not constitute the surveillance act communication and therefore should never be repurposed for law enforcement, keeping the original civic intent intact. So, ruled by the people is the original intent of democracy in the face of global threats such as pandemic and infodamic. I believe the Taoba model shows the world that this people-public-private partnership with the people, not just for the people, can shape a digital democracy. So to conclude, to give no trust is to get no trust. Trusting citizens to participate in policymaking can form shared goals, can develop innovative solutions, and also can contribute to the world. Thank you for listening, and I look forward to the questions. Thank you very much, Minister Tan, for this brilliant conversation. I have thousands of questions, but I know people are waiting, so I will limit myself to a few of them. So I was wondering first when you talked about these three steps when it comes to the rough consensus about facts, feelings, ideas. What about if you don't have a convergence of feelings? Is this a possibility that you have actually thought about that actually you may find an issue that is so polarizing that a convergence of feelings is basically out of the equation? Great question. So through the application of the idea of overlapping consensus, we always refine the consultation topic to be as specific as possible. For example, if the question was, what's the future of platform economy? Is it sharing or gig economy? The feelings may not converge, but the proposal was actually, how do you feel about someone driving to work and back picking up random strangers they meet through an app and charging them for it without professional driver's license? So the specific proposal makes it possible for people to resonate with a specific scenario, and regardless of their ideologies, they can then share their authentic feelings. So whenever we detect something that is too overly abstract, like marriage equality, we always whip it down to very specific proposals. For example, how about people who are single mothers or not in a heterosexual relationship who raise their children and make sure their children is feeling welcome by the society. And that instead of marriage equality, tend to get people into a talkative and sharing process of mood. I see. So for those, for my students who are attending, because I have a course on the theory of political, an introduction to political theory, we will discuss what you mentioned is overlapping consensus. So John Rawls and et cetera. So for those online, please, please follow. Also raise your hand if you want to ask questions. And we will unmute you. I would have another question. So you're part of the government, your minister. When you enter the government, when you approach first the governments with this idea of increasing transparency, gaining trust by providing trust and et cetera. I mean, have you not faced resistance by serious servants or your colleagues in the cabinet saying, well, listen, this is not how we do. And we prefer a certain lack of transparency in regarding certain of our activities. Also, you were welcomed with your new ideas. That's a great question. We are the resistance, by the way. So we are the occupiers, remember. And implicit threat is that if the government is not willing to increase the bandwidth of democracy or reduce the latency of democracy, the people will always prefer direct action. That's not always said, but it's always implied. And so because of this outside game, so to speak, the various mayors and political parties in our parliament, there's four major parties now, all of them compete on being more open. All of them sign on the open parliament agenda, simply because they know if they don't, they don't get elected, period. And so I think this is a norm first approach when people see during the pandemic that pretty much all the good counter-pandemic ideas are from the social sector. And the government simply through daily 2 p.m. press conferences amplify those good ideas from the municipalities and townships and so on. People then learn that it is everyone's duty to comprehend, so to speak, the latest virus variants and innovate on it. And this is only possible, I believe, because we in the cabinet are very fortunate in operating in a transpartisan or nonpartisan neutral space. In Taiwan constitutional design, the people elect directly the president who appoint the premier, who appoint the ministers. So there's nine ministers at large, including me and I think seven are nonpartisan. And all the mayor, sorry, the mayoral candidates in 2014, there are all of the different parties, but they all support this kind of radical transparency idea. And currently in the cabinet, there's more independence than members of any party. I can't go one. And so because our constitutional design made the career public service align with the nonpartisan or transpartisan ministers, this avoids to become a this party versus other party, left versus right thing and become just the basis, the fundamental infrastructure that we see democracy just like semiconductor design, that you can always improve on and it takes all the citizens to improve upon it. I see then it leads me to a follow up because you mentioned about we the people in the United States. I don't know how you, whether you consider it as a failure or but it seems that it didn't work as well as what you're doing in Taiwan. Well, in the United States, you know, better than I do, this is a bipartisan system in which you have a polarization of the state of the two studies that is pretty acute. Then the question beyond the United States, whether the Taiwanese experience and your initiatives is something that is applicable to other countries. And I'm thinking also not only about countries where there is a political polarization, but also in countries where people are technologically savvy as the younger generation in Taiwan. Yeah, that's two questions. Both of them very good. The first question about polarization, the assistive intelligence Polish that I just showed is actually from Seattle and there's this foundation called Computational Democracy and it's adopted by not just Europe and Taiwan but also in the US as well. And this is an actual conversation from Bowling Green, Kentucky. If you search for Bowling Green, Polish Civic Assembly, I believe, you will see the entire report and the shape is consistent. So just because it's in the US, doesn't mean that people don't agree with most of their neighbor's points, most of the things, most of the time. They agree to disagree on a few divisive ideologies but because in this pro-social space, people compete to get the agenda communicated across the aisle because that's a scoreboard. So you see people saying that arts are important in STEM education. We need to make it steam, broadband diversification of suppliers and things like that. And so you can see that this combines very well with a locality or municipal or even state level consultations even in a what's perceived as a polarized political environment compared to some more antisocial corners of social media, namely Facebook, which I often like to the digital equivalent of a nightclub where people have to shout to get heard, addictive drinks, smokefield room, private bouncers and I can go on. So by building in Bollinger in Kentucky the digital equivalent of a campus, of a town hall, you can, public park or whatever, you can avoid the direct consequence of having to do your town hall consultations in your local nightclub. Now the second question about digital savings, we bring technology to the people. We're not asking people to come to technology. So while you see the social innovation lab tools and so for the local people, it's just their same conversations that already happened in their community. It's just that through digital communities, we connect them with people who they barely know in some other cities, in some other municipalities that share the same social issues and we connect them to the participation offices in all the ministries. But after all, we're not asking them to go to any website. We're coming to them through the tours. Thank you so much. Just before I open the floor to four questions, I love your comparison between Facebook and the nightclub. I will keep it in mind. Thank you so much for that. Now, can we unmute Joe Marquez, please? They might enable, but they have to unmute. You have to unmute yourself. So Joseph, Joseph, can you unmute yourself to be the case? So next one. Madam Watanabe, can you unmute yourself? Yes. Hello, my name is Anna from Japan and I am really a big fan of you, Audrey. I really love your idea of a digital democracy and that you are working with the people, not for the people. I would like to know how are you keeping yourself so innovative? Like sometimes you might be becoming too busy of daily works and you're maybe becoming too tired. How do you make yourself time to think, always keep being innovative? Do you meet people or do you read big books? If so, can you recommend some good books, for example? I always recommend the Dao De Jing, it's a very old book by Lao Zi, it's a Daoist scripture. And I recommend the Ursula K. Le Guin translation that I always use. And the Dao De Jing really doesn't prescribe anything, but rather it frees one's mind against overdoing anything. It reminds everyone to be just good enough, not perfect, because if you are perfect, there is no room for innovations to enter. But if you're just good enough and ask the communities to correct your bias, to correct the shortcomings, then you make very good friends, right? And personally speaking, I always read books and so on materials before I go to sleep, but I do not make judgments in my mind. I just scan them into my visual cortex and I don't even speak out loud in my mind. I just very quickly scan through them. And then I go to sleep. I trust my dreams so that when I wake up, I always get some holistic ideas that are innovative and creates common values out of very different positions. So I don't give myself pressure during daytime or during nighttime. I make sure that I wake, so to speak, in my sleep. If there's really a lot of tension, a lot of conflict, like the stakes holders are all over the place, I take all the sides, meaning that if there's a certain stake holder's voice that I simply cannot comprehend, I always think it's my problem, not their problem, and I spend extra time travelling with them, living with them if necessary, doing the ethnographic, just hanging out with them and making sure that I understand where they're coming from and then if I have to comprehend many sides, I just work extra hours, sleep for nine hours, sleep for 10 hours, until I naturally wake up with a synthetic, more holistic picture. I hope to answer your question. Thank you so much. Thank you very much. Any follow-up? Yeah, thank you so much. I'm happy to know that you also sleep long. Yeah, I'm pretty jealous actually, but I will try to convince my boss that it is something easy. Yeah, it works, so I will convince him. I will send him this video. Thank you so much. Yiska, can you unmute yourself? Abdulaziz, can you unmute yourself? Okay, yeah, finally I can. Thank you. First of all, this was very, very thought-provoking, a lot of food for thought. It was very interesting how democracy and digitalization and technology all go hand-in-hand. And God, I have a lot of questions, but first of all, I would like to thank you and the organizers because this has been a very, very wonderful opportunity for us, for people, students like us to learn. So very simple questions. You mentioned that in your presentation, the public volunteers are happy if things go right, if not, it's Audrey's fault, and this leads them to become innovative and risk-taking, right? So while that may be true in some cases, I'm not trying to be pessimistic, I'm a very optimistic person, but I have a question that whether, because if there's always a scapegoat, then isn't that a bit detrimental on the, let's say, societal or psychological level? Just a question. Thank you. So to clarify what I heard, what I'm hearing is that you're asking if people can simply say, blame Audrey, would that not create a kind of dependency on my position or on my kind of Taoist bearings? And wouldn't it be better if it's simply institutionalized? I think this is a really good question, something I think about a lot in the past five and more years after I became the digital minister. So we try very hard to design ourselves out and institutionalize the kind of scaling up of the local innovations. So for example, you're looking at presidential hackathon and this is our attempt as institutionalizing me. And we have a regulation now that says every year if you're a Taiwanese citizen, you can be in the public or social private sector, it doesn't matter. You can make a wish on any of the SDG global goal topics and the civic hackers who want to improve upon those can propose things that would work on a local level. And people would vote using a new voting method called quadratic voting that assigns the same marginal cost to the same marginal effect. Don't have time to go into details. So with 99 points per person, everyone can vote across the 200 or more projects every year in a way that uncovers their synergies. And then we mentor the top 20 or so for around three months before they get those trophies, five teams get those trophies from our president, Dr. Tsai Ing-wen. And when you turn on the micro projector that you see is the bottom of this trophy, it projects Dr. Tsai Ing-wen handing you the trophy and promising whatever you did locally will become national policy with all the personnel budget and regulation support in the next fiscal year. And we've been doing this for five years now. So I think this is a way to... There's still a abstract president in this case, not Minister Tang, but it's embedded in this micro projector. It's embedded into the culture that people understand that the social innovators can focus on their innovations and the state is willing to merge whatever fork, pre-commit to merge five forks per year that convinces a majority of people through quadratic voting. I can go on. There's many other institutional designs, but just it's not about pessimistic. It's about being real. And we tried very hard and sometimes successfully to design myself out into institutions. Thank you. Abdulaziz, you will have an optimistic follow-up. Try to be optimistic sometimes Abdulaziz. Well, I have a rather simplistic question, which is, can I ask it? Well, it's more on a global scale because so far the presentation and all this have been focused on very domestic proceedings. I have a more international-based, global-based question. You mentioned the US quite a few times. So for example, I'm from Pakistan and if we were to evolve this much in technology, I wouldn't find it a surprise. For example, let's say tomorrow in India, there are some cyber attacks or let's say some interventions from India because it's global international politics. And so in case of Taiwan, for example, when you have a nearby country which has, let's say, quantum computers or a legit quantum computers, how do you make sure that there is no foreign intervention, let's say, for example, Chinese intervention in Taiwanese cyberspace whenever you're doing the voting and everything? Just a very simple question because I'm very interested. Thank you very much. Yes. Thank you. A really good question. Yeah, the Sandstorm product that I showed, Polis also, we invite the Whitehead hackers to attack on that. So if you are a cybersecurity professional in Taiwan, you're going to have a lot of fame and fortune simply because you know cybersecurity. And the Whitehead hackers do the penetration testing and so on, not because they love their country so I'm sure many of them do, but because it really pays very well and you get to meet with the president and minister all the time and we only deploy to the public service after they're thoroughly penetration tested by those red team experts. And if you look at DEF CON CTF and so on, the Taiwanese teams are consistently like in the second place or something next only to the US team most of the time. So we take the cybersecurity issue very seriously and we also ensure that the public infrastructure, we use the open source components through this community auditing. So we share the auditing and penetration testing resources with other jurisdictions who use the same components as we are using. And so I believe with many eyes the bugs are more shallow and we also value resilience a lot. So in case that any of our data centers goes offline and so on, there's always multiple backup plans and not necessarily for interventions because we're in a place with a lot of earthquakes and typhoons is also by necessity due to those natural disasters and it also gives us plenty of time to run drills. I hope that answers your question. Thank you very much. That was lovely input. Thank you very much for your thought-provoking enlightenment. Thank you very much. Yeske, you should be able to unmute yourself now, please. Yes, I managed to do that. Thank you very much. Yes, good morning. I had one question about the expression of feelings periods in a decision-making process. Quite frankly, I've been recently traumatized by the way people just shout out at Twitter. So I was wondering the way you presented, it doesn't strike me that that happens in this process and if it does not happen, how do you explain that in this process that you have designed, that part does not happen, which is quite destructive in many ways and polarizes people rather than converges people. Yes, this interface has the remarkable feature of no reply buttons. So, and that applies to all our spaces, not just Polis, but joint platform, the e-petition. We learn from Betarekavik in Iceland. So you have a column of upvotable supporting arguments. You have another column of alternate options that are also upvotable, but there is no reply button. You can't really shout at each other, you know, across the aisle. The Slido, the Polis Joint and so on, they all follow the same design pattern of no reply buttons and we discover that with reply buttons trolls grow and with no reply buttons trolls can't with other people's times is as simple as that. That is genius. No reply buttons. I love that. Thank you. Thank you. Elena, can you unmute yourself and ask your question? Or let's turn to Fatma. You should have the floor, Fatma. Otherwise write down in the chat and I will read your question. Now, so in the meantime, just a question, Minister Tan. Since you began implementing all these initiatives, have you seen talking to people? Have you seen them more engaged in political issues? Have you seen the, I would say, a democratic flavor growing in Taiwan? Is there really effects on the way people think about their government, about their role in the community? Yes, and it's the most pronounced in the basic education age bracket, people under 18. And the reason why is that they are before the voting age, right? So prior to these designs, there's simply no way for them to participate in representative politics. But now people under 18 are the first class citizens in our open government plan. And in fact, we do have, I think this is primary schoolers contributing to the air pollution measurement around Taiwan. Just in their balconies or in their primary schools, they have this Raspberry Pi or Arduino based open hardware, open software air boxes that measures the air quality and contribute to distributed ledgers. And they learn data stewardship and feel a sense of empowerment because whether their parents go outside to jog to run in the morning depends on their numerical contributions in their school and in their balconies because the official weather stations are just very far away, right? So by taking matters to their own hands in primary school level and in middle school level, then they would fact-check the three presidential candidates around 2020 as they are having the platform and debate and they contribute to the crossroads fact-checking. So if they type down all the transcripts the presidential candidates were saying and fact-check against the known sources and after vetted by professional journalists, their contribution can appear in the national livestream for fact-checking the presidential candidates. Again, that's very empowering. And once they're on the senior high, I think the joint platform's petitions, one of the most active edge brackets are senior high students around 16, 17 years old. And the next most active are 60, 70. And I think these two edge brackets have more time on their hands, frankly. And they care more about sustainability about future generations. And so, for example, we have a 16-year-old girl proposing that we ban plastic straws out of the takeouts of our national drink bubble tea, among others. And we held collaborative meetings and there's a lot of 60 and 70 years of supporting but without going on strike every Friday, we eventually implemented the conversations rough consensus and she's now, she's just 19 now, she's now the council, the committee member of our national action plan on open government. So Commissioner Wang is her name. And so just by giving the young people the titles, commissioner, reverse mentors, national advisers, it made sure that they feel fully empowered even before they turn 18. Otherwise they won't start magically caring when they turn 18. Incredible. I wish my daughter had the chance to participate in politics and get engaged before 18. I have the head of the department of international relations at the University of Geneva, Jubin Gudazi. We want to ask a question. So of course he has the priority, Jubin. Good morning. Yes.  Thank you very much, Minister Tang. I enjoyed your presentation very much, very illuminating, very enriching. My question is, well, Taiwan, of course, is a country which is a developed country. It's come a long way since over the past, since the 1950s, 60s in terms of development. And of course, it's a democracy. It's been the transformation of such a democracy in the 1980s. And you have a population of over 20 million, around 23, 24 million. In terms of the model that you've implemented and with the policies that you're pursuing in Taiwan, and of course, you have other countries in the world. Of course, there are countries whose population is smaller, less than Taiwan, and there are many others whose population is much greater than Taiwan and developing and developed. I was wondering, I know your focus, of course, is responsible with regard to your own country, Taiwan, but I was wondering whether, with regard to the model and policies that you've adopted in Taiwan, what do you see the challenges and also maybe the benefits of trying to implement a similar approach in other countries, which may have smaller populations or larger populations at different stages of development. I know it's a very sweeping question, but if you have just maybe one or two insights, you could share with us, I'd appreciate it. Thank you. Thank you. Full disclosure, I'm not just digital minister.tw. I'm also on the board of seven social innovation organizations NGOs around the world working on their jurisdictions. Taiwan is just one tentacle that is to speak, one lab, upon which we can experiment. And indeed, as I mentioned, we learned no reply button thing from Reykjavík, from Iceland, which is another example that was often cited in textbooks. We learned participatory budgeting from the Consul Democracy Foundation and later on Desidema in Spain and in Barcelona, respectively, and they're also textbook examples. And we learned about the open data to open API data collaborative from GovLab. I'm also an international advisor there in New York. As I mentioned, the Seattle people invented Polis and also people in New Zealand work on many presidential hackathon-like project and we have N-Stack, right? Taiwan-New Zealand Relationship Bilateral that allow our presidential hackathon champions to also work in their jurisdictions and so on. I think this is a network of democracies and by sharing the digital public infrastructures, we are able to build the digital equivalent of public parks and public libraries, if you're talking about open data, right? In a way that benefits all the jurisdictions without arbitrarily making a multilateral like this country is in other countries out decision. In Japan, I'm perhaps more famous for contributing on GitHub translation along with GovZero people to the Tokyo Metropolitan Dashboard Encounter COVID but I did not go through the Ministry of Foreign Affairs I did not go through the Taipei Representative Office or whatever. We simply made a full request because the components are open source, they are free software they're freely available online so the more we contribute to these commons just like the Wikipedia editors, right? You wouldn't say we bond the use of those creative commons data in certain jurisdictions simply because they are not recognized by the UN as a country or something like that we would simply say that this is a commons and the more that the democracies want to engage the commons the more they learn from the open street map community, the Wikipedia community and many other communities. I hope that answers your question. Thank you so much. I will give the floor for the last questions to the people who have not taken the floor so I'm sorry Abdulaziz you may have to pass on this one so I'm now you had a question I saw your hand raised at some point or isn't it maybe I missed and then otherwise Fatima has two questions one is regarding I don't know if you can see it in the chat Minister Tan I guess it's pretty related to the question we had before about the threat of foreign introferences and also the threat of surveillance I think the idea is to make sure that the surveillance is done in a way that is civic meaning that the surveillance is voluntary is well understood by the population at the end of the day through privacy enhancing technologies it's not aggregated anywhere outside of its purpose and previous to the pandemic there simply was not a lot of incentive to invent the technologies like this but because of the pandemic the contact tracing example that I show you it means between people not trusting the government anymore and suffering from lockdown or fatigue and the Taiwan model which is 23 million people and less than 1,000 people dead and so it makes the difference whether we invent a good norm based privacy enhancing technologies such as the 192 to SMS contact tracing system and the inventors because they're of zero in the social sector they establish the norm around which those data is used so when they're trying to be repurposed by the police or whatever the society, the social sector has the final say so I think this is important in any jurisdiction to trust your citizens to come up with such innovations such as this one instead of saying that you have to go to a digital nightclub in order to have any opinions simply find out what kind of public parks and campuses that your local people have already built they are actually fully private enhancing so that's the answer I have to the first question. The second question is an interesting one right because I think a digital democracy actually makes us less vulnerable in democracy you have already entertained all those different people's different ideas and you become inoculated against propaganda of any kind because after participating in a multi-sided deliberation one has the capacity in one's mind to take all the sides as I mentioned and because of that you are not going to blindly share whenever something that just seems outrageous simply cause you to press the share button or the reply button so to speak so for all the propaganda and disinformation tactics I do believe that only when people are actively fact checking day to day actively proposing new policies day to day instead of just a machine learning make it collaborative learning once people are in a collaboratively learning culture I do believe that this is the strongest resilience and resistance against digital authoritarianism so I hope to answer the question. I think the moderator throws in time. Well, in that case I will just read from the chat. What do you think are the chronic flaws do you think are in the system that I intend to work with? That's also a very good question. I think it relies on two things. One, it relies on broadband as a human right if you do not have broadband as a human right it will incur additional economic cost to people who are less served by the internet and it will result in making the inequity even worse by including people with broadband by excluding people without right. So in Taiwan even on the top of Taiwan almost 4,000 meters you're guaranteed to have 10 megabits per second bi-directionally for just 15 euros per month otherwise it's my fault personally my fault so I do have people emailing me saying that they don't have broadband connection in one of the quarantine hotels near the Yangming mountain and we make sure that we set up a repeater to improve that in just two weeks and well they're already out of quarantine but he actually drove back to measure the speed and the person on social media to help me to account so fanatical commitment to broadband as a human right as the first thing and the second thing is in basic education we need to make sure that instead of just literacy which is for consuming the information we need to teach competence so that the students feel fully empowered to as I mentioned measure their own weather quality measure their own assessment on the fact fullness of presidential candidates alongside many other things if we do not emphasize that in basic education then we risk creating like capturing propagandist narratives that will leave people worse off right so I do think that independent critical and creative thinking competence not just literacy in basic education is the other often missed in addition to problem as human rights hope to answer your question so if there's no other questions I think I'll just read some poetry and wait for the power to come back this is my job description a poem that I wrote when I was in New Zealand in 2016 when I became the digital minister and the backstory was that the people were asking me so we never had a digital minister but with a digital minister do and I was like well IT just connects machines digital connects people and people were like this is pretty arbitrary can you actually tell the differences between IT and digital and I say okay I'll try so what follows is my job description goes like this when we see the internet of things let's make it an internet of beings when we see virtual reality let's make it a shared reality when we see machine learning let's make it collaborative learning when we see user experience let's make it about human experience and whenever we hear that a singularity is near that as always remember the plurality is here so that's my job description thank you everyone for listening okay I do have to run so I can't really answer more questions I'll just leave you with the thought to let's just trust our fellow citizens thank you very much, lifelong and prosper a few moments later can you hear me yes I was just coming up but that's fine I think we concluded we completely so very sorry total blackout in the building so you know and we can finish on this note if you agree well digital technologies are still fragile somehow broadband is a human right and resilience must be planned I completely agree anyway we took too much of your time already so I would like to conclude this way I thank you so much for your time, for your thoughts it's a great lesson for us, for all of us I'm a political scientist I'm not techno savvy but now I understand I have to do my homework in certain new technologies it was a pleasure and it's always hand lighting to hear from you thank you so much and I wish you all the best in your activities in the near future thank you and I trust that you have the recordings so share it with our people and I'll also disseminate it into the commons so thank you for contribution to the creative commons cheers thank you so much, thank you everyone bye


We're now going to work an example problem involving the adiabatic flame temperature. So what I'll begin doing is, as usual, we're writing out the problem statement. So there is our problem statement. It's a rather long problem that we're dealing with, but what we have is we're combusting methyl alcohol vapor, and we're told that it is in a container, 28 liters, originally 25 degrees C, 98 kPa, and what I want us to do is determine max pressure if combustion is constant volume. That's the first thing. The other thing that they want us to determine is max volume if combustion is constant pressure. And what we are to assume is that this is taking place adiabatically, which is specified here. So what we need to do is calculate the adiabatic temperature, and then with that we can determine these values. So let's proceed with what we know and what we don't know and try to work this problem. So that's what we're dealing with. We have combustion of methyl alcohol vapor, stoichiometric air is in the reaction, 28 liters. It's adiabatic. We know the initial conditions. We want to find max pressure if it is a constant volume combustion process, which would replicate what happens in the auto cycle. And we also want to find max volume if it was constant pressure combustion. So the first place to start with solving this problem is to do the stoichiometric balance. We don't have excess air. We have the stoichiometric amount of theoretical air. So that will simplify things a little bit. But let's begin by doing stoichiometry. So we're beginning with the carbon balance on the left and the right looking. We have one on the left and one on the right. X is then one for hydrogen. On the left we have all the hydrogen is in our methyl alcohol vapor. We have four on the left and on the right we have it in the water vapor, because that is 2y. And with that, that tells us that y is equal to 2. For diatomic oxygen, we have 0.5 in the alcohol. And given that we know x and y, we can solve for this. And therefore the theoretical amount of air here is 1.5. And finally, for diatomic nitrogen, we get this. So we can rewrite our chemical reaction as follows. So that is our reaction equation. And what we will now do is we will go ahead and we will address part A, which was maximum pressure if we have constant volume combustion. And we will use this equation in the first law for that in order to do that analysis.


Alright. Let's check it out. Play it in full. We switched to two gorillas and by we I mean you. I didn't do anything. Alright. Cool. I think once you get to here. I think it's okay. I think since we already have a traveling camera so this is a quick thing. What I would add are a couple of rocks here and things and later on if you can like little set trees whatever you have. But it will also help us in terms of just the travel of the camera. So once we get to here, this seems to be like a translate pan and tilt. And in here it looks like we're suddenly going this way. Translate wise.  So what I would do top view of those are your gorillas. You can translate the camera for a while. Then I would just ease in and stop and then do the rest through just tilts pan and tilts. Meaning you translate till here. And then once you're here, I would just stop the camera. All the translates in the graph. Come to a stop. And then through here, when they go this way, don't translate the camera, but keep them framing wise to something that's more like that or something like this that might as well be centered. But I would just reframe just to rotate. So if they go here, again, no translations but rotate in Y so that they he doesn't crowd that corner so much that side of the back will be maybe here. So there's a bit more that this starts to feel a bit uncomfortable where I'm not sure why we're needing this much space. This would work if something else would come in stomping or an explosion or something. And then here that's fine. And then the exit is fine. All right, that's just for staging. And I think generally the idea works. I'm just going to have to really look at the reference in terms of weight transfers and the speed of it, especially through something like this. So once you get to here, and I'm looking at this one, sorry. So as you have this, when you start taking those steps, right, and I know this is an early pass and it's rough, but that's when you're going to have to look at the reference of how does this massive creature handle a jump back and a compression. But once you get to here, you can see how nothing is moving in the hips, the chest, that arm, those locked moments you're going to have to work on. Or moments like here when both arms kind of go up with the chest at the same time. So those are all the refinement passes you're going to have to get into. Even on something like this, after he does, bam, sideways slap, like that force is going to impact him a bit more. There will be some shake in there. And then this drop down here is almost a bit slow. It's not too bad, actually. It just suddenly seems. It's almost too relaxed. So by slow, I meant it's more like, and then it's okay. You don't mean it's just there's something where and I'm asking you mean and it's not live. You can't answer me. It's always so silly. But after this massive confrontation and slap, this drop and then one to starts to feel almost casual versus stronger drop and then maybe a faster, stronger, more tense move forward and then mouth open like a roar. So so you can start deviating from the reference and get a bit more confrontational and a bit more creature reacting at this point here. Then on stuff like this, when you have arms that are somewhat bent, right? I don't think that what is this one frame of a push up this way is enough to bring that gorilla all the way up here. So you're going to have to play a little bit more with a drop and anticipation. Maybe he leads with the head up as well. But you want to make sure that those mechanics and the weight works and something like this. And then especially something like that where this feels like the gorilla is on wires and is being pulled up and then kind of drops. It's not clear if this is a push off that sense the gorilla over here, but then it will be initiated through here, right? Because that impact seems to be here. So then it will have a rotation back with less of a lift. This is really high. If you want to jump, then you're going to have to show that there's a bit more of a compression and a jump off. You know, it's not going to probably as high. And that is also a bit soft that landing, especially with here. It feels like you're easing in almost with hands. Same thing with here eases in. So I would just kind of look and push the reference and moments like this, I would tweak it where maybe that leg would be further out with a foot roll. So you have, you know, you have a bit of a cleaner silhouette, even if it's cheated. So you have nicer negative space, you know, so it's not so overlapping here. And then like this is a bit unfortunate with a shape like this and they're very twins. Pose is just that that step out just feels slightly weird. Then you got the upper body all connected as one rotating. And I know this is rough. I'm just pointing out the things that I would look at as you continue on stuff like here. And this one gets hit feels like you have a fast move away from us, right? Which makes sense because that's the force that pushes that one over there. But then after this, you can see how you have that rotation in the root over there and it stops. And then it's only just translates down. So as you initiate and move over here, it has to continue with our momentum and slowly recover. And how is that going to work? So it's going to be more of a side step because that just feels mechanically a bit impossible to have such a quick move. And then suddenly it stops and there's no recovery. There's no bigger change of direction that's initiated through maybe this step for balance. And then moving over this way is the same thing. You move towards us, towards the camera. And then it just suddenly stops. So that sudden stop of momentum and movement is always a bit weird, loses the weight. He's really off balance here and takes too long for that step there to regain the balance. So there's just a little bit of some issues of weight here and there. Same thing on that. On this, having the head here. Hey, that head is a bit too IK because rotation is the same. This, this, there's no rotational change.  So that just feels a bit disjointed. But overall it feels like the momentum is initiated to go back this way. But then suddenly it stops and it just a quick translate forward. And it doesn't quite work physically because technically the way, you know, if it's right over this leg, there's no way he can advance so quickly. That leg would have to be a bit further back so that there is a force that can push this way. Right now it's so much straight on that that amount of speed doesn't quite work. They would have to be more leaning forward, maybe a swing up and then the leg has to be further back to get that directional force there. All right. So that's the stuff I would look at. But it's cool. It's cool to see. And again, I would add some background pieces so we can understand the camera moves a bit better. It's always tricky when the surface is just one color. And then like I said before, once you get to hear ease into the stop of the camera translate and then don't move and just keep it all under rotations. And then I can do a pass once we're closer on the stage and everything if you want on a handheld camera. And I can show you how that will liven up the whole thing a bit more and give it a bit more of a realistic feel. All right. That's it. Thank you. All right. There's an email. You can sign up. You can start whenever you want. You can submit whatever you want. You get 16 submissions either way. Like and subscribe would be awesome. All right. Thank you.


So we had the SID display week and who are you I'm John Sandberg with pixel scientific I'm the production specialist and I handle a lot of the work that we do and we primarily resize liquid crystal displays for Custom sizes we take it so those are all custom sizes right here Yes, that is correct all custom sizes in addition to having a custom back lights to go along with them So if our customer needs a resize display, we resize it if a customer needs a backlight to drive some light into that display We do that as well So for example the aeronics the aviation market They maybe they they need us very high quality very high performance displays, right? Yes, but the specific size Oh, yes specific size more importantly and also high resolution. So this is our 20 by 8 4k display. It was originally a 23.8 inch display. It's primarily used in the F 35 flight simulators and And It is a 4k display resized to the 20 by 8 resolution and there's a hit these days so It's only for the simulation machines I'm not in the actual airplane and some particular cases. It does fly And so but it's not 4k what kind of resolution ends up when you cut off a 4k I Don't know off the top of my head But it's gonna be high resolution very high resolution all the high specs of that display Retain the manufacturer specs the seal that we when we resize the display We have to reseal where we made the cut and our seal holds to the same standards as the manufacturer seal from very low temperatures to very high temperatures and Other rigorous testing and right here you have a very thin one. Yes, we do this one has a lot to do with shelving So this is more for the digital signage industry less for the aviation industry and Just a nice unique bar What are you sharing over there? These are actual open cells So this is the cells themselves. It's kind of cool because it shows you exactly what we do here It would be an NEC panel and was four by three aspects ratio and here We've cut off about two inches of it and you can kind of see exactly where the cut is all the way down into the flex Excise the flex turn a four by three aspects ratio into a square and that is the same story here with the five by five kind of I Guess remnants of the aviation industry again needing a certain aspect ratio for their flight simulators five by five six by six Resize cell with a modified circuit board for the cell to fit in the customer's specific installation In addition, we do things such as custom backlighting this here in particular dual mode with en-vis lighting And Other installations such as this five by five with a much higher brightness values and we We take pride in resizing displays and filling our customers need and how's the backlight quality? It's great. All kinds of different. Uh-huh. We have That's a good question. We do higher value higher knits. We do custom backlights. We We do edge lit backlights And then in software you can drive all these different resolutions Even though they're custom resolutions that come out of it, right? Yes So the display itself doesn't realize that it's been excised it continues to drive as though the rest of the glass We're still there so For the purpose of the customer they can plug it into the same controller kit as they would have had With a standard display and just turn the thing on and power it up and there you go LCD that's right. And so the this liquid thing that's inside the liquid crystal display Uh-huh.  It doesn't care It's uh, it's very tame if you were to cut a display and just leave it open the liquid crystal material would remain There the atmospheric pressure is enough to keep it immobile So is this mostly about a Small order quantity projects That is what the interesting part is that it's a very large range We ourselves do low volume in addition to prototyping But we have licensees as we are the licensors of the technology of resizing a display. So we have Licensees who are able to do high volume at a Just anywhere in between, you know low volume high volume you answer so you you would take a crazy high grade Display from which kind of company samsung or samsung lg and you see tianma in a lux Everybody really great pixel densities and they have some great 4k monitors and even 5k 8k coming out You work with 8k. Oh, well we cut 4k as we have showcasing here And I believe that is next up on the list of things to do So they'll be busy with the 8k custom Yeah, we are very good. The party cut off. Can you use it somewhere else? Oh, no, you can use it Throw it in a trash can if you're looking for some fun, maybe some target practice But no, it's sadly we have not come up with a way to cut a display into two working displays But if you come up with that then uh, give me a call


If I haven't made it clear yet, we shouldn't presume anything about the relative positions of variables in memory. If we have a contiguous chunk of memory on the other hand, then it can make sense to play around with pointer arithmetic. So how do we get contiguous chunks of memory? There are two ways, by allocating memory on the heap or by creating arrays on the stack. We'll look first at allocating memory on the heap. Recall from earlier videos that the heap space of a process starts out unallocated, meaning that the OS hasn't actually mapped the processes virtual addresses to actual physical memory, and so using those unallocated addresses triggers a hardware exception. To use heap space, a process must explicitly request that the OS allocate a chunk with a system call. In the system call, the process specifies how big the chunk should be, and the OS responds either with the starting address of a newly allocated chunk of that size, or with an error if the request cannot be fulfilled. Once a process no longer needs a chunk of heap space, the process should tell the operating system to deallocate that chunk with another system call to which is passed the chunk's starting address as argument. If a process hangs on to allocated chunks it doesn't need, the process wastes memory and risks running out, especially if the process allocates many chunks over a lengthy running time. A server program, for example, is typically kept running for many days if not months or years, and so failing to properly deallocate unused memory will very likely lead to the process exhausting available memory at some point. In garbage collected languages, the language itself does the allocating and deallocating for us, but in C, that job is left to the programmer. The C standard library contains the functions malloc and free, which invoke the allocate and deallocate system calls respectively. malloc, short for memory allocation, takes a number of bytes to allocate as argument and returns a void pointer. So here the void pointer returned by the first call to malloc is assigned to void pointer variable v, and the void pointer returned by the second call to malloc is assigned to float pointer f. We then do whatever we want with these two heap chunks represented by these pointers, but once we're done with them, we should deallocate these chunks by passing the pointers to free. The free function expects a void pointer as argument, so we can pass f to free without having to cast. When allocating memory, we very often want chunks sufficient to store a particular number of values of a particular type. For example, I might want to store 100-ints. If I know that my target platform uses 4-byte-ints, I could then simply allocate 400 bytes, but what if I intend to compile my code for multiple platforms? The solution to this problem is the size of operator, which returns the size in bytes of a specified type. Size of is a strange operator in two regards. First, it is written as a word rather than a symbol. Second, size of takes a type as operand, not an expression. Anyway, here are three examples. The first returns the number of bytes occupied by an int. The second returns the number of bytes occupied by a double. And the third returns the number of bytes occupied by a float pointer. Notice that the float pointer type requires parense because otherwise the asterisk wouldn't be considered part of the type. For consistency and clarity, some programmers like to always surround the type in parentheses in the style of a function call, even though size of is not a function. So here we put size of to practical use. We invoke malloc with the argument seven multiplied by the size of int. So say, assuming four byte ints, malloc here returns a chunk that is 28 bytes. If we then assign 12 to the dereference of p plus zero, we are writing the int value 12 into the first four bytes of the chunk. Assigning 13 to the dereference of p plus one writes the int value 13 into the second four bytes of the chunk. And then assigning 14 to the dereference of p plus six writes the int value 14 into the last four bytes of the chunk. If we compile and run this code on a platform in which ints are some different size, it will still work as intended. The allocated chunk will always be the right size to fit seven ints. Remember that the memory allocation system call is just a request, not an order. And so sometimes the OS will refuse the allocation, such as when the system has no more memory to give. Therefore in practice, we should always check the result of malloc for a null pointer, the value returned when the allocation request is refused. Here for example, before using the allocated memory return to p, we first check if p is null and branch accordingly. In the branch where allocation fails, we may simply have to abort our program. In the branch where the allocation succeeds, we do what we want with the memory chunk, but then must remember to deallocate the chunk when we no longer need it. What C calls an array is a chunk of memory allocated on the stack, rather than the heap. Because an array is stack allocated as part of its containing function stack frame, it is automatically deallocated by the language. When execution leaves the scope in which an array is allocated, the memory occupied by the array should be considered deallocated. And so any pointer values representing addresses in bounds of the array should no longer be used. Accessing the memory of an out-of-scope array won't always trigger a hardware exception, but accessing out-of-scope memory should always be considered unsafe and illogical. Creation of an array looks like a variable declaration in which the variable name is suffixed with square brackets containing a size in terms of the type. The name of the array itself is not really a variable, but rather a pointer value representing the first byte of the array. Otherwise, array names are like pointer variables in all respects, except you may not assign them new values. So in these two examples, Jack is a float pointer value representing the address of the first byte of an array that is the size of eight floats. And Jill is a char pointer value representing the address of the first byte of an array that is the size of 200 chars. In this code, we have an int array i and a char array c. Because the name i is an int pointer value, we can assign it to the int pointer variable p. We can also dereference array names just like a normal pointer. Here, when we assign negative six to the dereference of i, we're writing the int value negative six at the start of the array. When we assign eight to the dereference of i plus one, we're writing the int value eight at the address which is one int sized chunk up in memory from the start of the array i. And the last line, when we assign the char value five to the dereference of c plus seven, we're writing the char value five at the address which is seven char sized chunks up in memory from the start of the array c. Note that we have to cast the number little five to char because the number little is an int and we can't assign an int to a char l value. Now let's look at a somewhat realistic example of something we might do with arrays and heap allocations. Here's a function sum that takes an int pointer nums and an int n as argument. Nums is expected to point to the start of a contiguous block of ints. Meanwhile, n is expected to denote the number of ints in the block. The function then loops from zero up to but not including n, and in each iteration we add to sum the dereference of nums plus our counter i. At the end of the loop, sum will hold the sum of every int in the block. So here's one example of how we might call the sum function. Say we create an array of three ints called a and then we populate the ints to the array with various int values. If we then pass the array name a and three to sum, it will return the sum of all those ints. Because the sum function expects an int pointer, we just as well could pass it a block of heap allocated memory. Here, assuming the colt and malloc doesn't return a null pointer, the pointer p represents a block the size of three ints and we can pass this block to sum. If you're wondering why we might ever use blocks of heap memory rather than arrays, which seem more convenient, well consider the problem with this function. This function fred returns a char pointer and the body simply creates and returns a pointer representing the start of the char array. While legal, what this function does is very dangerous because the array is allocated in the stack frame of the colt of fred and so goes out of scope once the call returns. So what the caller of fred gets back is a pointer to memory that is unsafe to use because it will likely get overwritten by the frames of subsequent function calls. And even if that doesn't happen, the processes stack boundary might move such that access in the memory of the array will trigger a memory access violation. All around, using stack allocated memory that goes out of scope is just a bad scene. In this alternative version of fred, we heap allocate a block of memory instead of creating an array. Because this block lives on the heap, it is safe to use until we explicitly deallocate it. Notice that it's the caller of fred's responsibility to test whether fred returns a non-null pointer and to free the block. Now that we've introduced arrays in heap allocation, we can talk about strings. In truth, C has no actual string type. When you see a string literal in double quotes, the expression is actually a char pointer value that represents the address of where the characters of the string are actually stored. The characters of a string literal are encoded as ASCII and stored in the processes text section, aka the unmodified part of your process's memory where the code itself is stored. The end of the string is denoted by a null byte, a byte that is all zero bits. So here we have a string literal with the characters ABC. This text is stored as four contiguous bytes in the processes text section, and the string literal is a char pointer value representing address of the first of these four bytes. So here when we assign the string to char pointer S and then dereference S plus one, we get back the char value residing in the second byte of the string, which will be 98, the ASCII value for lowercase b. The C standard library contains a number of functions for working with strings in this format. The Stirland function, for instance, short for string length, returns a number of characters in a string up to but not including the null byte that terminates it. Here we pass Stirland the character pointer S, and Stirland will read the bytes at that address until it encounters a null byte and returns the count of bytes read, not including the null byte. So the int variable I will be assigned the value three. C has no built-in support for strings in other formats, but if you want to work with, say, unicode strings, you can do so by storing their bytes in arrays and heap allocated blocks. Just keep in mind that these standard library string functions will only correctly handle ASCII encoded characters, terminated by null bytes. When using unicode strings, you'll need unicode specific functions to provide the equivalent functionality on those strings.


If you're in prison where does the census count you as living? Do you live where you were before you got sent to prison or do you live in the prison and outside of four states? New York, California, Maryland and Delaware you count as living in the prison not where you came from So that means you have a county with maybe 700 people in it, but it has a prison So that has like 3,000 extra people in it, correct? Right exactly who can't vote but count and now do they not vote and count but they tend to be disproportionately Hispanic and black from the cities so disproportionately liberal Democratic voters who now have been moved to Republican districts right and so it beefs up the Republican rural vote it's incredibly boring right census enumeration yet it leads state reps across the country to really powerfully fight reform because if they if reforms happen in prison strength they'll lose their seats and the parties will lose their seats right I named the states because it's not a random sample right California, Delaware, Maryland and New York for the bluest dates in the country