Our next speaker has done nothing less than pathbreaking work in the area of intellectual property. He probably could be considered the Satoshi of IT, if you will. American intellectual property lawyer, libertarian legal theorist. He's created the website, the libertarian standard. He's created an academic journal, the libertarian papers. He's written a number of books including my favorite Louisiana civil law dictionary, but probably he is best known for a book called the really turned the libertarian world on its ear. This argument continues on, it rages on. He continues to debate any and all comers online, but he is, well, this is the perfect time in the cyber world to have a lawyer in the house, and he is our lawyer in the house. Please help me welcome Stefan Kinsella. Thanks very much Doug. I'm really glad to be here. I just flew in from Houston. I really like to thank Jeff for giving me the chance to speak on a non-IP topic, which I do enjoy. So my topic today is on legal tender. I'm going to explain briefly how I got interested in this topic and then go into some background. When I was in law school, 1989 or so, I was clerking at a firm in Baton Rouge. I was asked by the partner to research the question of whether it was legal or illegal to refuse to take a payment of cash under legal tender law.  I want you to write me a check instead. So I started researching what is legal tender. If you look at your dollar bills, it'll say this note is legal tender for all debts, public and private. It's sort of a mysterious meaning. What exactly does that mean? How much money do you have to pay to satisfy a debt? So I started getting interested in it. A couple of years later I was in graduate school in law in London and I looked at the British Pound notes and they have other language which says, Bank of England, I promised to pay the bearer on demand the sum of five pounds or ten pounds or whatever the note is. So like a smartass, I walked down to the Bank of England one day in the middle of the financial district with a backpack dressed like a student and I walked in the front door and I asked, I said, can I redeem this for five pounds of whatever it is it's five pounds of? And they said, you have an appointment. I said no. So they sent me out and they said you have to have an appointment to come into the Bank of England. So they said, if you mind wanting to visit the Bank of England Museum around the corner. So I walked around the corner, I went to the Bank of England Museum, I was the only guy there and I started asking the curator these questions and he went to the back and he brought me a mimeographed. I think that's an old work for photocopy, right? A mimeographed sheet of typewritten papers explaining why that language doesn't mean that they really have to give you five pounds of silver or whatever it meant. They claimed that it just means that if you have an old note that's out of circulation now, we'll replace it. So five pound note, you get a new five pound note for it, so that's what that promise means. So over the years I've always been puzzled by this mysterious language which is omnipresent and yet no one seems to understand what it means. So as Bitcoin started heating up, I started thinking more and more about it and so Jeff and I talked and we thought this might be a good topic. So to research this, I researched a good deal of things, probably three of the primary things I relied on and if you find this talk of interest, you might want to look at some of these. Guido Holtzman has a fantastic lecture on the economics of legal tender laws at the last Mises University. It's online and I will post these slides on my website later. So SteppenConsola.com so feel free to look it up there. Hapa has a great article which I rely on heavily in this talk and also I found a 1903 fantastic old treatise on Google Books on legal tender. Okay, so I'm gonna back up for a second and try to put this legal tender issue in context before we get into the actual mechanics and issues of legal tender itself. And this is drawing on Hapa and others like Franz Oppenheimer. Franz Oppenheimer argued that there's only two ways of creating wealth. One's the political means and one's the economic means. One is cooperative and peaceful and one is coercive and exploitative. And this is what Hapa argues as well. He basically points out that there are only two ways to acquire wealth in the world that we live in. One would be homesteading production and exchange. So you find or you appropriate a resource that's unknown in the world. You increase the sum total wealth in the world and your wealth. Production means transforming these resources into more valuable configurations. So that's production. That's also a way of increasing wealth. And exchange is when two people exchange things that they own and they're both better off after the transaction. So the sum total wealth in the world increases that way as well. And then the second way is expropriating producers, appropriators and homesteaders and exchangers. So the first method gives rise to productive enterprises like firms and corporations and businesses. The second gives rise to governments and states. Okay, now if you think about private enterprise, private industry, productive enterprises, their growth is constrained by a couple of things. Number one, they have to have consumer demand for what they're making. And there's competition in the market. So that's a constraint on the growth of private firms. But the growth of an exploiting firm like the state is constrained mostly by public opinion. And the reason is because by its nature it coerces people and creates victims. And by its nature it's a small portion of society. So you have a small minority dominating the larger majority. So the only way they can get away with this is to somehow persuade the victims that the state is legitimate. So what is the state's goal? The state is a wealth maximizer just like we are. It just doesn't have any ethics. So its goal is to... And by the way, I don't know if this crowd is entirely libertarian, but that's fine. But you are listening to one and in fact I'm of the anarchist variety that thinks the state should be totally abolished. Just the libertarians here would know that already, but just fair warning. So the state's goal is to maximize its wealth that it can exploit from its victims. And it tried to do this by engaging activities to increase its public legitimacy so that it gets away with it. There's two main things the state does. It engages in ideological propaganda trying to persuade us that the world is not the way it really is, that taxes are really voluntary, that we would have chaos in the streets without the state, et cetera. And then the second thing the state does is it engages in a variety of redistribution measures by which it seeks to corrupt the people that it redistributes money to into supporting the state. Not just any redistribution will do, there are certain targeted types of redistribution that tend to work well for the state. Now these include the monopolization of the production of law and security, police, defense, the courts, judicial system, also traffic and communication because the state can't go around robbing people without control of the rivers, the roads, mail, telecommunications, the internet. Also education, of course, which feeds back to the first purpose of ideological propaganda. So the state controls these things. And also the state redistributes state power itself, especially the modern sense in democracy. So the bureaucracy is open to anyone who wants to apply for a job. So potentially all employers, employees of the state. And then by democracy, the state lets us believe that we're really the owners of the state. The state really is as you'll hear this nonsense promoted by the state all the time.  Small consolation. The final piece is the monopolization, the seizure of control of money and banking. And in a way, this is the most important for the state. And this is why we're going to get to legal tender. This is the easy way the state has to increase income. The state doesn't control money and banking. It has to get loans. It has to tax people. And that's difficult. Okay, so what does the state want in terms of control of money and banking? What it really wants is a pure fiat money monopolistically controlled by the state so that so that all barriers to counterfeiting are removed so they can print as much money as it wants to. But the problem state faces is that money arises in the pre market without the state as a commodity like gold or silver. And then counterfeiting of such a money can be noticed by people. It won't work. Even the state can't get away with that. So the state really has to destroy the gold system, the silver and gold commodity money system, so that obstacles to counterfeiting or overcome or removed. Okay, so how does the state do this? It systematically does this. First, the minting of coins gets monopolized by the state. And one thing this does psychologically is labels for money like an ounce of gold, an ounce of silver, or replaced gradually with state labels like dollar, drop mark, whatever. So people start to stop associating what money is with an amount of commodity. It's a label that the state grants to money. And then the state encourages the use of money substitutes like paper. Backed up by legal tender laws, which I will get to in more detail in a moment. Then the state monopolizes or carburelizes the banking system as we see in America in the Federal Reserve. Then it nationalizes gold as Roosevelt did in the 30s. And then cuts the tie to gold as Nixon did, giving it unlimited counterfeiting power. Okay, but it's not completely unlimited because there's not, there's more than one country in the world, more than one nation state. So all these countries have their own currencies and if anyone's stated plates too much, then there's a flight to other currencies. So the dominant state, namely the United States, has an interest in dominating and controlling the world's international money system. And over time we'll try to institute either a single world currency that it controls or that its central bank controls, or some kind of subtle but hidden system of interlocking agreements under the UN or various treaties that gives it control of the world's monetary system, which we see now. Hans-Hermann Hoppe's, you know, hypothesized that you know, one day we'll have a new UN currency dominated by the U.S. called the Phoenix or something like that. So you can see this coming. Okay, so now let's go back to legal tender. You see the role it plays in this process of state control of society and exploitation. So the word legal tender comes from the word tender, which comes from the Latin tinder, meaning to stretch. Right, think of the word like your tendons in your body, stretch, or the English word extend. Okay, so the word tender means to stretch out, to offer, to make an offer. Okay, like an offer to pay money. Okay, so the legal tender idea is a government rule or law that specifies that a given contractual obligation can be satisfied by the offer of a certain amount of money that the government declares to be legal tender, even if the contract specifies otherwise. Okay, so if you have a contract repaid in Swiss francs, then the debtor can still pay in U.S. dollars if U.S. dollars are legal tender. Okay, now this, the idea that you can pay a contractual obligation in money is not necessarily statused. In fact it makes a lot of sense for administrative purposes. This was, let me go to the, this is a better version of that. Under the Roman law two thousand years ago, allegations were held to be satisfied by a certain sum of money. Okay, the idea is that every service or every item on the market has a market price and you know even if you promise to give someone a goat or just saying if their kid's birthday party, if you fail to live up to your obligations, then a certain sum of money could compensate the the other party for that. That's not too controversial. You know if they don't give you the goat then you can get enough money to go buy a goat. So it works out pretty well. It's the idea of restitution. Right, now there are some exceptions to this.  Okay, the idea is that a piece of land you have to, the courts will enforce that kind of contract. They will make the land transferred to the guy that it was promised to because the land is unique and where it's located, etc. Okay, so, so there's really not a big problem with the idea of paying off a debt in money. But then the question is how much money? Okay, and this is what legal tender laws almost always do. They specify fixed exchange rates. Okay, this is what the government's after. If the government merely said you can pay off any contract in but in dollars, okay, so if you have a contract in Swiss francs, well you're paid in dollars but you're paid in enough dollars is equal to that current value of Swiss francs so you just go buy the Swiss francs right after the deal's over. It's just a little inconvenience. It's not a big deal. Of course that's not what the government wants. The government wants to favor debtors usually itself. Usually the government is a big debtor. So what they want to do is specify an exchange rate that lets you pay off the debt at overvalued legal tender money. Okay, so it's a way of robbing the creditors. Okay, now this, this gives rise to a phenomenon called Gresham's law. I'm not going to do too much economics here but raise your hands if you've never heard of Gresham's law. I'm not going to ask the rest if you understand it. So Gresham's law is simply based upon the expression by I think Irving Fischer an economist who said bad money drives out good money. Now this is a little counterintuitive because usually on the free market good products drive out bad products right like Blackberry's tanking down the iPhone is doing well. That's maybe one example. And even in money right, gold and silver arises money instead of shells or leaves or cigarettes because they're superior. They're better money. So really on the free market we respect good products and good money to drive out bad products and bad money. Right, so really what Gresham's law is it's really not that bad money drives out good money it's that legally overvalued money drives out legally undervalued money. Let me give an example of this. Okay, imagine on the free market the ratio of silver and gold prices is 20 ounces of silver to one ounce of gold. Okay, so they're roughly equivalent on the market. So if you're offering to sell something for 20 ounces of silver if the guy pays you an ounce of gold you'll take that because they're roughly equivalent. Now the government comes in and establishes legal tender and says that one ounce of gold is equal to 40 ounces of silver. So you can see that in this case what the government has done is they they make gold legally overvalued and silver legally undervalued. Okay, so if I if I owe someone 20 ounces of silver I could pay them 20 ounces of silver which is worth an ounce of gold on the market or I can take my ounce of gold and go take half of it and buy 20 ounces of silver and pay off the guy that way. Right, so let's me stiff the guy. So what this results in is no one's going to use silver anymore because they're going to be they're going to be stiffed by this provision. So it would drive out the good money which would be silver in this case. Now in this particular example what would happen is that you would have a system where previously silver is used for small change and gold is used for for big big purchases. Right, but now if silver disappears you only have gold so what do people start doing to for small purchases? Well they start resorting to substitutes like tokens, coins, banknotes, etc. See where this is going? The government gets us used to paper money and things that don't really have let's say an intrinsic value but a commodity value of their own. So that's a question of law. This is one effect of legal tender laws. Now on the history of legal tender let's look at how it started being justified by the state say in England. So the crown the crown would say listen if you're coming to the state's courts to enforce a contract you're seeking justice from the king's courts then you have to submit to conditions we want to place on you. So if we say yeah we're going to help you enforce your contract but we're going to insist that you take payment in legal tender that we decree at a certain chain ratio. Now actually if you think about it this is selling justice. The courts are using their their the government is using its courts to sell justice to make a profit off of monopolizing the institution of justice and then selling the service which actually is a violation of the Magna Carta from 1215 in the Magna Carta the crown agreed to the to the Magna Carta which had a vision that says in Latin I won't read the Latin but the translation is to no one will we sell to no one will refuse or to delay right or justice. So they're not supposed to sell justice but they do it anyway with these with these legal tender laws which is one danger of the government controlling the courts and the law and the justice system. Now let's turn to the US now in the colonies before before the the revolution coins were scarce you know they couldn't bring a lot of coins on the ships over with them maybe they didn't have a lot of coins anyway. So they started using substitutes and these were declared legal tender by the various state the colonies the colony governments. Some may have heard of wampum before I never knew what wampum was but wampum is the Shelby money that the Native Americans used those were legal tender but black was worth something white was worth something else it was bizarre. Other things have been used for money legal tender corn bullets although you could only give someone so many bullets force them to take so many bullets tobacco, pitch, tar, pork and even country produce you can pay your service with country produce. In the year 1715 up to 17 commodities were legal tender to pay taxes in the colonies. Now we've got these little bit out of order. 1775 right before the Revolutionary War Congress was planning for war they knew war was coming they needed to raise money they knew that they didn't have any creditability as a new government to raise money by loans and they didn't have taxing power they couldn't raise a lot of taxes anyway. So what they did was they started issuing bills of credit but they were declared to be payable by the states so they expected the states to go out and raise taxes on their citizens with their taxing power the colonies I should say I guess there were states by then and pay off the the bills that way but Massachusetts and other states refused to do this they started issuing their own bills of credit and making them legal tender okay and this language here is striking shows you how seriously the government takes its monopoly over money and these legal tender laws they said that if anyone refuses to these notes and payment for a debt or even if you demand a premium in other words you think gold is better than a note that's denominated in gold but they really can't be redeemed in gold if you demand a premium like you say I'll take that note for a 10 percent discount because there's a risk that's illegal too and you would actually be deemed an enemy of the country and other states like Virginia, New Hampshire, Rhode Island had similar similar laws now 1781 turning to my top bullet there so the Articles of the Federation were finally ratified and it wasn't clear that Congress was granted the power to define legal tender it remained with the states turn turn forward a few years after the war is over constitutions ratified 1789 everything flips the states are denied the power to to coin money and Congress has granted the power to be the one in charge of legal tender etc well this was settled in the Supreme Court cases later but it's pretty clear now so right after this Congress passes an act 1792 all gold and silver coins which shall have been struck and issued from a mint shall be lawful tender and all payments and then there's a 1965 act which has similar provisions so that's where we are now now let's turn to uh I'm already talked about this let's turn to the use of gold in gold clauses so how could the states say in the U.S. cut the tide of gold well one way one way they could do it is they could set the exchange rate that's not market like using Gresham's Law as we mentioned before which is what the state did for a while you know they keep changing the exchange rate of gold it used to be one one uh one dollars or 20th of an ounce of gold then it was 30 one thirty fifth and nowadays it's it's a market rate um so just quickly go through the history of gold and gold causes 1933 Frank and Roosevelt issues in executive order criminalizing the possession of gold in the U.S. monetary gold so gold was seized by the government and outlawed and right after that the congress uh under Roosevelt outlawed um gold clauses a gold clause is a clause in a contract where if you're afraid of inflation in the dollar you could say you owe me a million dollars um well you owe me whatever the current dollar amount of 100 ounce of gold is in 10 years or whatever the term of the deal is that way if there's inflation you have to get dollars each of the paid dollars in the current paid to the price of gold okay so they were out they outlawed that of course because that's one way to do an in run around the government's legal tender system now in 1974 under president Ford the ban on gold ownership was finally repealed 1977 under carter gold clause over re-legalized for contracts enacted entered after october 1977 and Nixon cut the tie to gold okay so in this time all three things happen the dollar is no longer redeemable in gold there's no ratio anymore so the question is do we still have legal tender in the U.S. in a way i think we do not have legal tender right because you can have a gold clause you can pay your contract in gold it's not illegal you can own gold and the dollar doesn't have any fixed ratio just fluctuates so why isn't it just a mere inconvenience now well in a way it is so why hasn't gold reemerge this money well there's various possible reasons why it hasn't one might be that the dollar is not perceived by most people as being in the stage of hyperinflation so there's no big urgency to use gold clauses there's also Mises's regression theory which is the idea that money arises step by step and how always has a history so once something it's like a network in fact like facebook is more popular than google plus right now right so the same idea once something is money people keep using it unless something terrible happens also gold is subject to the trend of taxes sales tax and other types of taxes which money is not taxes have to be paid in dollars too that could be another reason and finally there could be fear of another state takeover like you know if gold clauses ever had an effect the state wouldn't let us use them they only let us do things that don't really threaten them so getting to bitcoin here what's the implications for bitcoin okay first let's step back and think what gold clauses are and what there's two types of monetary transactions that you can think about that are relevant to legal tender one is what's called an executed or maybe a a contemporary the contemporaneous transaction for example I walk up to a merchant and I say I'd like to buy that newspaper he says give me a dollar and I make the deal it's done it's done right there there's no future obligations on either party the second type is an executory contract sometimes called an executory contract that's one where there's an obligation in the future okay so we have a contract now you know I want you to build a house for me and when you're done building the house I will pay you $500,000 okay that's an executory contract and at the end of the contract the work done by the service provider if he's not paid he could sue in court to get the money he's owed okay and legal tender law kicks in only there because the obligation to pay him can be satisfied in whatever money the government declares to be legal tender so legal tender laws never have much in effect on contemporaneous transactions because if you walk up to some guy and he wants the artificial price for his goods he just refused to pay it he'll walk away he'll do the deal so legal tender laws only affect the second type of contract now as far as I'm aware I think bitcoin from what I've seen is used mostly for the first type of contract right now okay I'm not aware but I'm not even aware of a lot of gold clause contracts much less about where I'm aware of the practice of people entering into long-term significant contracts with bitcoin clauses are denominated in bitcoins so you know like not even an employment contract but a longer term contract like let's say alone okay I loan you a thousand bitcoins you need to repay me 1,100 bitcoins in in a year something like that for bitcoin to emerge as a full-fledged money it seems to me it needs to be start being used for the second type of monetary transaction as well and I suspect that it will as it gates the state and what it does the relevance of this legal tender discussion is that the state can do what it has done before with the gold clauses it could outlaw bitcoin clauses okay or any they would have to find a way to find it so that it covers litecoin and others as well right any kind of electronic currency they probably really go as gold clauses while they were at it and then the other way would they could they could declare a fiat exchange rate they could say one dollar is equal to one bitcoin right they could do something like that they would legally overvalue the dollar legally undervalued bitcoin so this is a conclude here this is the relevance of legal tender law this where I think it could be heading and the bitcoin community needs to be aware of this and try to keep an eye on the government thank you very much I'm not aware of that but I would I think they're probably unconstitutional under the under the constitution's prohibition of states interfering with that or at least be illegal because the government has preempted the field by by determining what legal tender is I can't imagine that survive a challenge in the federal courts the state we're in right now I know does not tax uh gold and silver so obviously coin coin shops operating along along the Georgia border you know have residents from Tennessee that come across to convert your fiat into uh gold and silver for uh you know savings um the vendors in Georgia have that advantage I remember that's one thing you spoke about is the some of the states are taxing the sale of gold and silver and that's something we're looking at pushing back against in the state of Tennessee to get that fixed well I I do think for for gold say to uh to ever become money again we have to remove these obstacles taxes one of course there's still federal capital gains tax which would apply um and who knows maybe the government's going to start trying to tax the states that tax gold sales might start trying to tax bitcoin sales I'm not sure uh yeah my name is Steven I think it's very interesting this question of uh legal tender laws because fundamentally it's only relevant if you're dependent on the state to enforce contracts it's completely irrelevant if you no longer are dependent on the state for the enforcement of contracts so I guess it's not so much a question as it is uh something food for thought um what does that when we're no longer dependent on the state for the enforcement of contracts no I absolutely agree and I think if we can come up with private arbitration measures or even some kind of anonymous contract enforcement system that would be one way to severely hamper the government's ability to impose legal tender because as I said they do it primarily through these executory contracts enforcement um a lot of the of course larger more established bear companies play very safe they're very conservative and they're going to be very reluctant to opt out of the state system at the current time I think so that's going to slow the adoption rate but uh yeah I agree I think that's our hope is that we can go to alternative systems there's a group called judge.me which I'm signed up to be an arbitrator for which we're trying to do things like that but it's still in the infancy and it's still uncertain of course yeah so at the beginning you mentioned you know um and somebody's got a contract and paid for a million dollars like you said like can I refuse a million dollars cash yeah I don't think you can answer that during the speech so like if somebody wants to pay for a million dollars cash can you say no in VJ? I actually was unable to find an answer when I did it back in 24 years ago but since then I've researched it and my understanding is that um you can it's hard to find but the problem is one other problem the good thing about a world full of free societies that we live we don't live by permission we don't live like in soviet union where everything that it's everything that's not permitted for bidden is supposed to be the other way around right we have islands of restrictions and an ocean of liberty we're supposed to have that right so you can't find a restriction in the law on some activity then the presumption is you're free to do it and I couldn't find a restriction but you never know if you've exhaustively looked at every one of the 17 shell feet of federal register rules so I couldn't find a restriction so my conclusion was I think you can do this but in the meantime I researched it and it looks like it's pretty clear that you can you can refuse a mode of payment if like it's too dangerous to receive a briefcase of cash you're not really fusing dollars you're just refusing the mode of payment so I believe that you can refuse it of course you can specify the contract ahead of time but you have to pay me some regular safe method of you know cashier's check or wire wire transfer I mean when you close on a house quite often they'll assist on a cashier's check you show for the personal check they will take it that's not really a violation legal tender law hi I wanted to ask you a question that I heard you asked recently at the property and freedom society about the raw volume conception of property rights in which all rights are property rights and all crimes and violations of property rights because it seems like in the bitcoin space either a passive observer of a bitcoin user of a careless bitcoin user or else a really smart mathematician can transfer someone's bitcoins involuntarily would you describe this as stealing and do we need to rethink our version of property rights into something that has more to do with societal norms so I this is my amateur opinion on this my layman's opinion I know they're experts on how bitcoin works its standards the code more than I am from what I've been told by people that know a lot more about bitcoin than I do like you it's actually not a violation of the rules of bitcoin to somehow discover someone's private key and use that to take bitcoins from their account for it to be against the rules you would have to you know you clicked on the terms of service or something like you do but that's contrary to the purpose of bitcoin being pseudonymous right so I don't believe there's any term of service anyone agrees to so it's actually not prohibited by any sort of rules that anyone agrees to and it's not a property right because a bitcoin is not a scarce resource it's a ledger entry it's just it's a distributed system that people agree to to use because it's useful and it basically associates some accounts with others and that could be useful so I don't believe there's a property right in it I think it's analogous to property rights the way it works and it may be even better than some property rights the way it works in terms of practical reliability on it so whether norms that arise that that you know people with their finger and they they uh at people that that somehow we're able to do that because it's so secure the only way I can think of doing it would be some kind of social engineering anyway I don't know how they're going to guess someone's private key or get it now if you break it to someone's computer you hack their computer or you break into their home to get their keys then that should be a crime because you're trespassing against their actual own property in order to get the information and then what you do with the information would be a measure of the damages that's owed to the victim of the trespass but I don't think Bitcoin is property a property right but I don't mean that as criticism I don't think that's a negative thing or a bad thing as we head to lunch a couple things to think about you need to take anything that's valuable with your computer's Bitcoin take it with you the the hotel here has a wonderful restaurant and I highly recommend the tomato soup if you are alone for lunch and you're sad about that just turn to the person next to you and invite yourself I guarantee you there is no one in this room who is uninteresting so you'll have a wonderful time thank you'll see you at 1 30 Peter Serda coming


Thank you for being here and for coming to our first presentation of the Farmers Forum. Our first presenter is going to be Stu Jacobson and you can see his presentation. The name is Increasing Production of Locally Adapted Disease and My Resistant Bees. It's a topic that I'm sure that we're all going to enjoy. He comes from Illinois. He represents the Illinois Queen Initiative. I'm going to try to cover basically our organization, the Illinois Queen Initiative. Of course now I have to figure out how to get this thing to work. About three years ago there was only one person raising queens in Illinois for sale. There were probably a few people raising queens for themselves and maybe they gave a few away. There are still some people that do that. Now there's about 15 to 20 and we've trained over 100. A number of those people are still raising queens but they're not selling them. And we're interested in changing. We're interested in a gradual genetic revolution. If you can have a gradual revolution of the gene pool of bees in Illinois and also in Missouri and other Midwestern states. You can't do that unless you provide queens and or small colonies or nukes for sale to people. I mean giving them away is not sustainable. So if you don't have a means of providing those then we're not going to make changes. We're not going to have a gene pool that's more adapted and more disease resistant to our local conditions. So this talk is a mix of what has been successful for us plus a few ideas that I'm going to make suggestions I have about how to go about in your state or perhaps in your region realizing this kind of thing. So I think I already addressed this question but I have an article on the IQI and the Illinois Queen Initiative website. I wrote several years ago. I haven't changed my thinking that much. So I have the it's illinoisqueeninitiative.com and the URL or whatever it is on the last slide. So we needed an organization to train people how to raise queens because obviously you can't produce disease resistant or locally adapted queens unless you can raise some kind of honeybee queens. Right now we're still in that mode where we're trying to train more and more people. In an organization is the means of carrying that out. So in our initial attempt we identified initial goals and objectives. Our goal was basically to make that change of the gene pool in Illinois that I mentioned how we're going to accomplish those goals and objectives mostly through workshops and decide on a structure we decided on a state coordinator that's me for now regional coordinators and a marketing chair which is extremely important. And what we have discovered is the strength of the organization is in the regions. It's in its different regions because that's where the different activities occur and then we come together once a year for an annual meeting. So we need really hardworking initiative taking regional coordinators not just voting directors as occurs in some beekeeping and other organizations that sit back and kind of wait for other things to happen. They have to take initiative setting up workshops coming up with ideas promoting the workshops etc. In my opinion it's probably best if an organization like this in this case our Illinois queen initiative is independent of the state beekeeping association. Ohio did it the other way and a new president came in the state beekeeping association decided that a rearing queen's adaptive Ohio wasn't that important. Pulled the funding. When I applied for my first SAIR grant we didn't even have a president of the state association and I knew the board well enough to know there's no way in heck that I'm going to run I'm going to run the proposal through this board because they were mostly kind of contankerous older folks my age and older which is pretty damn old. Okay and I'm sort of going at 78 rpm because I'm not used to speaking for 20 minutes. Okay the marketing is critical. I've become more and more convinced of this that where we have not met our short term goals of let's say training X number of people per year it's because we haven't gotten the word out. So the marketing chair position is critical and they need to develop a simple marketing plan call a promotion if you will but it is marketing with the regional coordinators. A website's important and ours is not well utilized. The webmaster is asking for content. We're not providing it. Our producer so-called producer page is not viewed by beekeepers as a resource as a place to go to find queens or nukes. I don't think the marketing chair should be the webmaster in part because webmasters in my brief experience tend to love their product or their art as everybody else does and you need someone else to say this needs to be changed. So it needs to be two different people. We need to get more articles out via the state association newsletter and their website. They've been cooperative with us and we recently discovered that we need to do more on the ground to local or regional beekeeping associations give talks promoting our queen initiative and promoting our workshops. So I've got to, well, I think I have about 15 minutes. One thing that I realized when I was sitting down thinking about how to put this talk together is I think what I'm talking about is applicable to groups that might be promoting brood stock or, yeah, brood stock for, let's say, grass fed beef where they're selecting a certain genotype which works better on grass than your average beef cow or pasture raised hogs or pasture raised chickens. So I think we have something in common with those kinds of organizations. I know some exist on the national level. I don't know if any exist on the state level. So we've also learned, and this is kind of obvious, but we had to learn ourselves, that the timing of the workshops and the locations of the workshops are really important. For one thing, if you're going to do a workshop on queen rearing, you have to do it early enough in the season that the folks who take the workshop have an opportunity to practice those methods, but that it's not so early that it's unrealistic that you can't pull Honey Bee very young larvae, extraordinarily young larvae, in order to graft. You can't really do it in most of Illinois probably in April. The weather is too iffy. And I would suggest that may be true in much of Missouri except maybe the Butale. It's important to teach practical methods of small scale queen rearing initially. Get people trying it, trying it out. Whatever you can do to get them involved in producing queens or producing nukes, which are small colonies with a queen, is more important than trying to jump them to some sort of semi-commercial level. For example, we're going to start teaching the cell punch method, and I can talk to people about what that is, but it's a lot simpler. It's a lot easier to learn than the traditional grafting method, especially for some of those that are increasingly visually challenged. It's just a lot easier to do, and it's a more natural, less disruptive process. The Miller method is actually a process where you get bees to draw out cells in natural comb. You never even move the larva out until it's actually no longer a larva. It's about ready to emerge as a queen. So those are simple methods that are not used by the big commercial folks, but that work very well for producing several hundred or more queens a year, which is more than most of us are probably going to do. It's important to conduct follow-up or troubleshooting workshops a month or six weeks after the initial one so that people that have gone out and tried can share their successes, or if they've not had success, they can learn from those that have been successful about the techniques and the methods in queen rearing. Queen rearing is not that difficult, but it takes practice, and it does take encouragement or ideally a mentor. Where's Nadia? Oh, how much time do I have? Okay, I'll try to dial back a little bit. One thing we've done is to acquire a number of potentially resistant or promising stocks to evaluate, and I won't mention several of them, not because mostly they just didn't survive that well initially, and I think it wasn't the genetics. It was some combination perhaps of the queen rearing at the time we acquired those queens, or that lot of queens, including we did get Buckfast from Canada, for instance, and perhaps the shipping, we got a lot from Pennsylvania that came through very poorly in June when there was a heat wave, and they didn't last very long at all. Actually half of them arrived dead, but the other half that came to me didn't last very long. So what we're going to focus now is on Varroa sensitive hygienic. I don't know how many of you have read, but unfortunately the source of the Varroa sensitive hygiene line, which was developed by the USDA with our tax dollars, the single source where you can buy these queens has decided to retire. He and his wife are getting up there and they have some, apparently their parents or some of their parents are still alive. There's some family health issues. I haven't seen his article or what he put out. This is a critical issue because the history of developing honeybee lines in this country is not very good once they go from a university or a government agency like the USDA out to the industry. It hasn't worked well. The only person that's been able to have a sustainable system is Sue Kobe, who's now sort of between Washington State and UC Davis. Marla Spivak's line, a great line. The Minnesota hygienic should now be called the East Texas hygienic and you don't want to buy something from Texas. Enough said, as far as I'm concerned. She's gone on to do some other things, but that line is not lost but is imperiled. And in the past there have been other examples. So this could be a real problem. Survivors are critical or not a critical. They're a key resource. Yes, they are critical also. They're extremely important resource. And I'm defining survivals more or less the way Larry Conner does, which is they've gone four years without any treatment and they've survived well. It's not that they've come through weakly in weak form, small population or so-called dinks, that are going to be lucky to survive a wet spring, let's say, a cool wet spring, much less make you any honey. But they're coming through after four or more years without treatment as strong colonies that will make honey for you. Those are survivors. We've got two sources in Illinois that have gone over 10 years. I'm working with one of them. The other one I've had difficulty getting stock from, but I hope to next year. In contrast, commercial sunbelt queens or bees, I mean bees that have descended from queens raising the sunbelt almost always have to be treated every year. But if they're not treated in year one, they're probably going to die by year two. If you look at some of the studies that were done by one of these USDA projects where they set up about eight different apiaries in eight different states, they used commercial stock. The stuff didn't make it very long at all. Genetics, obviously, are really important. To be sustainable, to survive for the long run, queen producer organizations like ours have to promote locally produced queens. They become the focus of the marketing, of the website, of most of the articles that are written. In Illinois, and I would venture to say most likely in Missouri, perhaps to a lesser extent, because of the nature of the landscape, the Ozarks and what have you, the vast majority of honeybee genetics come into Illinois, have come in historically into Illinois, meaning over the past 30 years or more, in the form of packages and the queens that are in the packages. That's what we've got, except for the ferales, which are, which underwent a huge loss, a genetic kind of bottleneck because of varroa, but have come back strong and many of those, of course, are survivors. Oh, and by the way, when we use, many of you know this, but there's a fair amount of evidence, increasing evidence, that when we use chemicals, whether it's Thailand, which is an antibiotic, or trying to figure the two harder chemicals that we used to use a lot for mite control, my mind is having a senior moment. They negatively affect the immune system of bees. So we're treating against mites at the same time, we may be weakening their capability to fight off viruses and to fight off nozema serana, which is a significant problem in some areas. Another point, I don't have time to belabor, but it's critical, beekeeping organizations, state beekeeping organizations, local ones, beekeepers, organizations like ours, the Queen Initiative, have to address the dangers of Africanized genetics being brought up north. We're bringing them in in packages. I'm gonna say right now, and I don't know how many people I'm gonna offend, anybody who brings in, who buys packages or queens from Texas and increasingly from Florida is doing serious damage to the future of beekeeping in their state, serious damage, because we get a few stinging incidents of dogs or God help us of a child or an older and firm person who can't move out of the way, because they bought a queen from Weaver in Texas, the neighbor did, has colonies, or they bought a package as a guy in St. Louis who buys packages from Weaver, thinks there's no problem with it, right? That will result in restrictive regulations about beekeeping. We've seen a huge popular interest in bees, a lot of support for beekeeping. That's gonna disappear if we have many incidences like that. The three rivers, beekeepers in St. Louis area, they no longer is an example of what we can do, what is capable, or what organizations can do, what we as a group of beekeepers are capable of doing. They no longer buy nukes or small colonies from the south, from Florida, but they're producing these nukes within their club, within their organization, and they prioritize new beekeepers. So they start out with strong stock and they're utilizing locally raised or at least in-state raised queens. And that's part of that gradual genetic revolution about Sun Belt genetics are really not sustainable. Let me just show you one or two slides quickly. This is just an example of selecting stock by testing for hygienic behavior. This is what happens with non-hygienic stock. You free, I'll show you a picture in a moment, but this is a soup can cut out, pour it into here, liquid nitrogen was poured in here, killed all the brood. Non-hygienic bees, they don't respond. This is what a hygienic one does. Is this Mike? All right. Here's a picture of us doing that. Here's the soup can. See, it's silver because it's really cold. Liquid nitrogen is really cold and no, you can't do this with CO2. This is a 64-ounce, I think, two-quart Stanley stainless steel thermos. It is good for carrying liquid in. It doesn't last very long, and you have to put a hole in the top for it to boil out because otherwise you have an unguided missile in your vehicle. But it's kind of a piece of appropriate technology. All right. There's the liquid end boiling off in action. All right. That's it. And there's a website I talked about. Are there any questions? Yes. That's everybody here. Up in this region, is it still advisable to buy from someone down like in the Cape Gerardo area far more preferable than getting a nuke from out of, say, Florida? Okay. Thank you. I would say yes. I would also say the more local, the better. I actually lived a year up in northwest Missouri, wherever the heck that is up there, Tarkio, which is a little tiny bird. The conditions up there are like Iowa and Nebraska. They're somewhat different from, they're rather different probably from the Boothill. But the closer you can get, the better. All things being equal. And he might have better stock than someone local, too, in the sense of the actual rearing of the Queens and other factors. Yes? I'm going to point out that what you're trying to avoid, correct, is Africanized stock. That's why the directive is not to buy from the southern states. It's because of that genetic stock, which we're not experiencing here, right? I don't know if we're experiencing. Yes, that's one piece. That's the sort of negative of buying from the Sun Belt. Increasingly, not all Sun Belt states at the moment. Not even all of Florida, I think, at the moment, but I don't want to gamble on that. But the positive side for purchasing locally produced stock is ideally that locally produced stock has some input from feral colonies. And so those colonies are, those bees are better adapted to the climate, to the winter particularly, or maybe to the spring slow wet springs that we get frequently, at least in central Illinois. And also, even to some of the local pathogens and also to the floral characteristics, the timing of major flows. So there's those two main reasons, apart from the support local and all that kind of thing, those two main reasons why I would try to buy as local as you can. One last question, because we have to move to the next. Thank you. Just a quick question regarding the use of multiple highs from different sources that are all survivors to try and combine gene pools or gene traits from different... Is that something you're looking at doing? You mean multiple colonies or multiple... Yeah, yeah, that's a really good idea, because in theory it's possible that you could draw from a source. I wouldn't say that it's inbred, but where the gene pool has been somewhat restricted again, because of what happened with Varroa twenty-some-odd years ago, or maybe it's pushing thirty, where we have pretty good evidence that the feral populations have shrunk to almost nothing. People weren't getting swarm calls. There just wasn't much going on. And so that's called a genetic bottleneck. So it could be in a given area that the genetic diversity is somewhat restricted. So if I can pull, in my case, there's a guy that lives half an hour, forty minutes from me. If I'm pulling from his stock, it's gone ten years without treatment. And if I can finally get this guy who lives down in Vandalia, which isn't too much farther to... If I can get some stock from him, that's really desirable. Yeah, that's a really good point. I think the concern about lack of diversity is a little bit overplayed, but there's good evidence that diverse colonies, genetically-versed colonies, resist diseases better than ones that aren't.


I've got my newest product that just released was Laundry detergent. They come in the form of a sheet.  Tell me more about that. Do we use less detergent by using a laundry sheet or do we use more? Use less. Mine's a box and it just slides out and it's a sheet and it's literally this big and it's ready to go. So there's no water. Because when you have those big bottles they use a lot of the water.  So you could take it with you when you can't. You travel, it's less clutter on your washing machine.


about using Rust from Sierra and any other language. I gave a talk at a meetup a few weeks ago or a month ago where I basically talked in great technical depth about exactly what Skylight strategy is, and that talk is gonna be way better for the technical details. What I wanna talk about today is more about the philosophy of how you should think about doing it because it took me a while of writing Rust code that interacted with Ruby, which is our use case, to figure out philosophically how to think about it so that you avoid bugs, and I'll talk about more why that ends up happening. First I wanna say my usual spiel about Rust, which is that I think the thing that's exciting about Rust in general, and it reflects a lot of people in this room, is that Rust is fundamentally a language that enables a lot of people who weren't able to write systems code, to write systems code now. And what that means without going into great detail about what systems code is, there's a lot of companies in the world that have a lot of engineers and they have some wizards floating around and what those wizards job is, is to write the C++ code that powers their company. And really in order for you to build a project that is very efficient in those spaces, you really do need to have some wizards floating around that know C++. And what that has meant historically is that people who work in either competing companies or startups have not really been able to go and compete in any area where you needed a legion of C++ wizards to get the job done. And so there's all these areas where startups just couldn't really compete unless you happen to be like a startup made up of people who quit some company and did it. But you, a person, a web developer, can't ever expect to be able to go and ever compete in these areas. And I think what Rust does is it lets people, it lets people do work that they couldn't have done before and that helps you as a developer, it helps you solve problems that you might not have been able to solve and that could have a lot of manifestations. But one that I've been thinking about recently is just the fact that there's all these areas where people feel like they're safe. There are these huge companies that have these teams of wizards that feel that they're safe because how is a little agile startup gonna compete with my C++ grizzled wizards? And that might not be true anymore. And I think that that's cool. And I would also say that if you yourself are a grizzled C++ wizard and there are many such people in this room, I think Rust helps you do your job better but it also helps you bring more people into the fray and if you really wanna be competitive then that's good for you also. So I think that that's awesome and actually that's sort of the story of Skylight. So Skylight is a small company. We have about seven engineers and those, I say about because it's been a while and fluctuates but those seven engineers largely had never written systems code before. And what we were building was basically a product that allowed you to instrument your Rails application so we could give you better information. And there were already people that existed in our field that were very big 800 pound gorillas that had many engineers. And we wanted to compete in this area with a very small number of engineers and fundamentally what this thing does is it basically collects information, sends it off to a daemon, the daemon sends it to the server, we collect it, we process it, we give you some information. And of course because we were Ruby programmers, the first thing that we did was we wrote the whole system just in Ruby. So the daemon was written in Ruby, the individual pieces that run inside your Rails app was written in Ruby and this actually worked great. It's actually a pretty good way of getting off the ground when you're a startup. But pretty quickly we realized that we had other things that we wanted to do. We wanted to for example collect information about memory allocations and report it. And with Ruby code we had hit the limit of what we were able to collect without imposing unacceptable overhead on you the application, on your application. And at this point we had a few options, right? We could have said we're just gonna stay where we are, we're gonna collect whatever information we could collect within the overhead of Ruby and then that's it. But what that would have meant is that we couldn't have been that competitive with our competitors, right? We really wanted to do things that our competitors couldn't do. So that wasn't really a great option. That felt like giving up. Another thing that we could do that we explored was rewriting pieces of this, some of these purple boxes in C++. And in fact Carl, who just spoke, actually wrote a working prototype of a lot of that stuff written in C++. And I took a look at it and I said, Carl, you are a much better C++ programmer than me. I do not feel confident that I could personally make any changes to this whatsoever without possibly introducing segfaults. And I think that's basically the story of C++, right? Even the best hackers in the world who work on browsers are constantly introducing, not just segfaults, but exploitable crashes. So C++ is not a great option for a small company, a small company that's trying to compete with the big boys because you might get some better performance that lets you do things you couldn't do but now you're gonna spend all your time tracking down bugs. And in our case, our code runs on environments that we can't even see, right? There are thousands of machines that we have no control over. So we can't even log in and debug. We really need to avoid segfaults. So we were kind of at an impasse. Our options were bad and worse, right? Our options were can't build a product you wanna build or possibly introduce very likely segfaults into our users' computers, which probably would cause them to stop being customers. So that felt pretty bad. And I got lucky, which is that around the time that we were starting to run into these limitations and customers are starting to report too much memory and things like this, Rust, Patrick wrote the blog post where he said Rust is getting rid of the garbage collector and Rust hadn't yet gotten rid of the garbage collector but Rust was talking about it. And so it became obvious at that point that it would be possible to write Rust code that integrated with Ruby code. So the first thing that we actually did, actually this is kind of backwards. So the first thing that we did was we took all the Ruby code that was, or a lot of the Ruby code that was running inside of your Rails process and we converted it into Rust. And the really awesome thing about this was that we were able to take, we didn't have to create, change everything. In fact, today there's still a fair amount of Ruby code because we're instrumenting Ruby code, right? But we were able to take big chunks of it. The things that we're using up the most memory or taking up the most CPU time, we were able to rewrite them in Rust. And I think this is a really nice thing about how Rust works, which is that you can sort of dip your toe in, you can take a piece that's expensive and you can go rewrite it without the fear that you might cause some psych faults. So we did that and then some time after that we rewrote the demon in Rust. And that was actually the biggest one because the demon in Rust we could run on eight megabytes of rock solid memory forever where in Ruby, as you probably know, that's not even a fever dream, as someone said earlier today. So we were able to run eight megabyte processes that never, that are stable and that was a pretty big win. But, so Ruby talks to C and Ruby talk, and if you basically wanna write any kind of native code in Ruby, like we were doing in Rust, at some point you have to go through the C boundary. And the C boundary is sort of what my talk is about because while everything I just said about writing Rust code is true and I can give a thousand talks about why it's awesome that we wrote all Skylight, the demon in Rust and all this stuff. At the end of the day at some point Ruby talks to Rust through a boundary that is unsafe. So Ruby's safe and Rust is safe but there's this dangerous boundary. And what I wanna talk about today and what I've spent a lot of time thinking about for Skylight and Carl as well is how do we both think about that boundary more correctly and how do we try to, how do we use that boundary in a safe way, right? How do we, so again Carl is an awesome C++ hacker and I trust him to write the C code but if anybody has to go in and fix bugs if anyone has to change like a login message even we wanna make sure that there's a pretty strong way of thinking about what's going on in that boundary that doesn't create so many bugs or that creates ideally zero bugs. So what this means is that the Rust compiler protects us from low level bugs but it only protects us from low level bugs in Rust. But, and this is the big point of what I'm gonna be talking about is Rust not only has a compiler that protects us from bugs it also helps us communicate about more universal constraints that exist in all low level languages. So whenever code you write in Rust is actually describing ownership problems that aren't specific to Rust the programming language they're specific to systems programming. So let me show you what I mean by that. So here is a function that you can write and see and this is, you can imagine we have a trace object and the trace object is a thing that's collecting up information before it gets sent to the server. So I wrote a function here and the function returns a car star, takes a trace name and it has, sorry, takes a pointer and it returns a car star and has some implementation. So there's a bunch of questions that we have here like is the trace name function allowed to retain an alias to trace star? Is it allowed to mutate it? Can a caller mutate the trace star during the call to trace name? And this is actually one of the more pernicious kind of bugs that can occur. And who's actually responsible for freeing that car star? Basically all these questions are left up to the imagination of the implementer and in a really, really good library you somebody will write documentation that explains it but every single time you write a function you sort of have to go through this checklist of things for every parameter and every return value to try to understand what is allowed and this is why there's a lot of bugs. Now let's look at the equivalent story in Rust. So in Rust we have a function takes a trace name borrow trace string very similar function but we actually have an answer to all these questions, right? No you can't retain an alias and if you write Rust code the compiler stops you. No you can't mutate it, I didn't ask for it in a mutated way. No I cannot, the caller can't mutate me and the caller has to free the return string and so these are all very useful things and importantly just like when you write in a type language you don't have to reiterate all the piece of information about every type and every piece of documentation and when you write in Rust you don't have to reiterate all these pieces of information about what these types mean in every piece of documentation. In fact this is what is awesome about Rust, right? You just look at the type signature and it's expressing in a very short, terse way a ton of information. So before I go more into the methodology I wanna say what's in scope here. So what's in scope today is writing a library like Skylight that is meant to be called from C and because C is the lingua franca that's the or any other language in my talk, right? So we're talking about writing a library that you compile into a .a file or .so file and then you're going to call it from some C code or some language that has a C API. And so that's the perspective of we're using Rust to create something that is just a C library. What I am not talking about today is calling C code from Rust. There's actually some similar ways that you could think about things but I am explicitly keeping it out of scope to keep things relatively simple. So before I showed the trace name function what happens if we change the function to an extern C function with no mango, right? So we have said this function is callable from C. It's important to note that all of the things that we said before about what this trace name function said are still things that are true, right? So it is still the case that this function is communicating that trace name cannot retain an alias to the trace that trace name cannot mutate the trace that the caller cannot mutate the trace, right? But there's a little bit of a difference here, right? Before what we were communicating we were communicating only the same things but we were expecting the Rust compiler to catch us if we make a mistake, right? We were expecting some other Rust code to call into this and the contract between the caller and the callee and some of those that contract is enumerated here we're expecting to be satisfied by the Rust compiler. So if I make a mistake it gets caught. And what happens when you say extern C function you're just moving the responsibility from the Rust compiler to the person writing the collaborating C code, right? So you're expressing all the same requirements and in fact if the person writing the C code violates these requirements, Rust is no longer safe, right? So if I call this function from C and violate one of these rules, Rust does not promise me that any code called from this function is safe. It can have second faults galore, right? So we're really talking about exactly the same requirements that we were talking about before. We're just saying that because we're calling the code from C, the C code is responsible for maintaining the invariant. So one way that I would say this is Rust is just a DSL for describing ownership concepts that you already have to think about when you're writing C or C++ code, right? So when you're writing C code all those questions still applied, right? I asked them, we didn't have an answer for them but I asked them. But we have to communicate them at ad hoc ways just like in a dynamic language you have to communicate things in an ad hoc way through documentation. And what Rust gives us is a way to communicate these things directly and tersely. The concepts of ownership are really fundamental. There are things that Rust makes you think about and this is sort of why a lot of people say when I go back to write some C++ code or even Ruby code after writing Rust code I think a lot clearer. Why do they say that? They say that because the concepts that Rust is making you think about are fundamental concepts. They're describing things that exist in C or C++. It's just that Rust gives us vocabulary to talk about it and it makes the contracts tersen enforceable. So let's look at another example and I'll use the same example throughout the process. So here we have an example of a function called trace ID. It takes a borrowed trace and returns a U64. Actually this is not the example I will use for the rest of the talk but it's an example. So we have a function that's trace ID. It takes a borrowed trace returns a U64. It's important to know that from a simple level, from a high level, if you're not thinking about anything else, Rust is expressing some things that are basically the same thing in that exist in C. We have a pointer, amp-cent-trace is basically a pointer in C and a U64 is basically a UN64T that is the wrong type. That's fine. And so from a basic level, when we don't think about ownership contracts, we're actually talking about something that's rather similar. And so there's a process here that we can use to get from start to finish when we're communicating. Step one is we need to identify and implement the shared type definitions in Rust in C. So we have a Rust function and we need to figure out how to express all the types in that extra Rust function in C. So that's step one. And we can sort of see how to do that. Step two is, okay, now that we have done that, we can use Rust's ownership system to flesh out and describe what the ownership and mutability rules are. And then step three is maybe, and this is sort of an optional step, you might in your C code or your C++ code find ways to dynamically enforce some of these requirements and I'll show an example of that later. So step one is identify and implement the shared type definitions in Rust in C. So here we have this function definition of extra in C function that takes a trace and returns a U64. And the first question is always, okay, I have this Rust definition, what is this type in terms of C? And when we're talking about basic numeric types, this is actually, I feel like I need to fix this, I'm sorry. So in simple types, for simple numerical types, there's basic one-to-one mapping. You might have to read the C standard to figure out what things are exactly guaranteed and I wish there was a table somewhere. That'd be awesome. But the go-to answer for simple types is basically, effectively the same thing in C. And basically these are like most simple copy types that are built in. So if we wanna write a prototype for this Rust function in C, we're gonna write something that looks like this, right? It takes a pointer to a trace and it takes a U in 64 T. Now what about this other thing? What about this trace object? So here we have a function that says new trace and what it returns is a box of trace. What is this type in terms of C? And I'm actually wanting to talk about this sort of in reverse here, which is to say when we're communicating arbitrary structure from Rust to C, I think the best starting point, unless you have a really good reason otherwise, is to treat anything in Rust that's not a basic numerical type as an opaque structure. And it's important to note that you might think, well, I have this structure, I wanna get access to its fields in C. And I would point out that you can just write an external function that does literally anything you could possibly want. But writing an external function in Rust, makes sure that all the rules that you're supposed to follow are followed and trying to do the same thing from C introduces a whole bunch of rules that you have to remember to follow. So my go-to solution whenever I'm talking about anything that's not a basic numerical type is to treat it like an opaque void pointer and write any functions in Rust in which I need to manipulate. So my go-to answer for structures that are not numeric is to treat them like void pointers. So you can basically, simple thing is to just do a type def from void pointer to trace and then you can do the right thing. So here is the simple example that I'm gonna use a little bit is I made a simple structure called point. It has an X and Y, two I64s and I have a function that returns returns a point, a box of point and it takes two I64s and I have a function that returns the length of line between two points as an F64 and it takes two points. And I'm not going to write the info here on this tiny slide. So this is a pretty simple thing and what I want to talk about here is how do you represent that in C and in terms of the rules that I just said. So basically what you do is you say, okay, a point is a void pointer like I said before and I'll just make some type defs here to say I64 is just in 64t, F64 is double according to relatively modern C standards and now I'm going to write two functions that look like the equivalent rust function. So now I can say point new point of I64x and I64y and I can take line length right. So far all we're doing remember we're not talking about ownership at all. So far all we're doing is we're finding sort of consistent methodology for taking a thing that looks like an extern rust function and writing and accessing it from C, again ignoring all ownership rules at all. And basically what I would say is the simplest way to get started if you're just trying to get started you don't have any very, very complicated requirements is for things that are numerical portable copy types just use the portability for your own structures just return a box of t and type defs at the void star if your function takes a bar pointer that's again the same thing it's a pointer in C and then there's an exception which I don't want to go into which is that there's strings and vectors are a little complicated and you probably want to define some kind of mechanism for transferring it. But the TLDR here is just effectively anything that is not a number treat as an opaque structure that you don't have access to at all and see except as an opaque structure. I think that actually simplifies your ability to reason about things. So, and I would say also in practice you basically always end up wrapping the rust pointer that you get in some kind of object for your language. So in C of course you don't have to do that because pointers are pointers but if you're writing like a Python extension or a node extension or Ruby extension you're gonna end up taking that pointer and putting it into some other object and out of scope for this talk. So that was step one. Again I think step one is actually the boringest part it's the part you could sort of reason through yourself if you're building, if you're trying to write C extensions that talk to rust is we have some types of rust, we have rep or C, we have U64, it looks like a U in 64T, pointers look like pointers, so basically everything's fine, you can sort of muddle along and everything's fine and if you in fact write this code without any more methodology, basically everything will work fine because basically most of the time people don't have bugs, right? So in the same way that you would basically be fine if you wrote everything in C if you do this stuff you will basically be fine. But what we really wanna do and the really interesting part here is to say okay now that we have done that what are the actual requirements of the C code, right? So right now we have written some code that just talks about rust complicated ownership types as bare pointers. And if you just write some random C code you're not going to know to do the right thing. So how do we describe what the requirements are of the C code? How the C code can think about its communication with rust. So let's go back to this example, right? This example we have an extern function, it takes two points, it returns an F64 and it calculates a line length. So what do we do so far? So what we did so far was we said these ampersand points are the same thing as a void pointer and we said that this F64 is the same thing as a double, right? So that's what we did so far and again it's pretty straightforward and if you muddle along it will work, right? Your program will run. But again, rust types are saying more things than just that this is a pointer of type, you know, float with 64 bits in it. So let's imagine, let's do an exercise and let's imagine that what we're going to do is write some docs for this hypothetical C API and if you were trying to hide the fact that you're writing rust code and produce a library, you might do this anyway, right? Write some docs that say what guarantees you can have and so what we have here is we've done the same type definitions but now we want to say a few more things. So number one we say, okay, we take two point structs and you can rely on the fact that the line len function will not create aliases to the points that outlive the invocation and it is old, so that's the guarantee that the line len function is giving you and your requirement, your part of the contract is that you should produce memory that is valid and immutable for the duration of the call to the line len function. So we're basically saying these two things and I also added const here because I didn't want to type the sentence that const means in English but it actually adds very little. It basically just says that the line len function will not mutate things but that if you look at the other pieces of text there's more points about mutability that the rust thing is saying, right? So let's go look at again the documentation that we wrote and the rust function. So we have these two ampersands here and yes, yeah, yes. So I think the point that he said the const is not actually saying the thing I wanted to say. Okay, this is actually why C is painful. So the point is you might have wanted to write a sentence that said by the way this function is not going to mutate the memory that you give it and that would have been a useful, it seems that sentence would have been a more useful sentence than writing const regardless of whether I got it right or wrong. So we have these ampersands and first of all these ampersands are saying const but they're also saying these other things, right? They're saying you can rely on the fact that there's no aliases being created and again, once you get into the rust side the rust compiler will actually enforce the callee's part of this, right? So the callee has some requirements like not making aliases. The rust compiler totally doesn't force its side of the contract but there's some parts of the contract you have to enforce. I'm not going to fix that. The point should be memory that is valid and immutable for the duration of the call to the line line function is a requirement that you have on you, right? So I guess the point that I'm trying to make here is rust is expressing in very short a terse form, a thing that you have to write a lot of documentation for. So if you are actually writing rust code that you are yourself consuming from C I would claim that you should just use the rust type signature as the explanation of what the requirements are. So instead of trying to make sure that you always remember all the exact set of rules and transcribe them correctly and keep them up to date as you might take different signatures I would claim that the signature that we have here the ampersands that we have here are enough to express all those things and that that is actually the right way to think about it, right?  And of course the fact that this contract is unenforced is why we tend to not like writing a lot of C but in this case we can't get around it that's the premise of this talk so at least we have some clear understanding of what the rules actually are. Now step three is an optional step but I do it and I think it's pretty useful which is try to find some ways to do some dynamic enforcement of the rules that we set up and I'm going to show a hypothetical library without any implementation that you could imagine working and then talk about momentarily what we actually do but the hypothetical library is you import an ownership.h and every single time you make a new rust type you put it inside of a cell and every single time you want to pass it to rust for borrow purposes you call the borrow macro so that's not so interesting so far that's basically just getting a pointer out. The reason it's interesting is that there's another there might be another macro called transfer and when you call transfer what that is doing is it's removing the pointer from the cell and so if you actually try to borrow again in the future you get a dynamic error so that's a really simple set of macros so you can imagine someone writing you can do a more robust set of macros that handles more cases but the point is that I think it's pretty useful when you're writing C code to have at least even if the macros don't even do anything and don't provide dynamic errors I think it's pretty useful to have a set of macros that at least express to future readers of your C code what you were trying to do and I think it's especially nice if the macros can enforce things. Okay so that's sort of my methodology. Step one do the sort of boring muddle thing where you convert your rust types into C types mostly by using opaque pointers and writing externe functions to do anything interesting. Step two is now you actually have the set of rules that are the ownership requirements and mutation requirements and either document them if your consumer is somebody who doesn't know about rust or use them as your documentation if your consumer is you and then step three maybe do some dynamic enforcement I want to say some things that I didn't cover here so I talked about only return types that are super simple and if you have a non-simple return type I think or you want to express errors I think the right answer is to use an out pointer to express return and a boolean to express whether an error happened but there's some other thing that you could theoretically do but you should make it consistent. I also haven't talked about like rep or C of structs and just like using a rust struct from C and getting at its fields again I think that most of the time that's more trouble than it's worth and you should think carefully about why you actually need it that's not to say you might not if you have an extremely chatty situation but it adds, it makes you have to think about all these problems very granularly instead of very coarsely which is not great. I also didn't talk about exactly how to implement dynamic ownership and that's because if you're writing an embedding for like Ruby or Python or something like that there is probably already a type that is the object type of your system that lets you put like a C pointer into it and if that type exists then you should use that as your cell and then you can write some macros against that type. So I don't, it's gonna be specific to the thing that you're actually trying to do but the rough confers are what I said are correct I think. I also didn't talk about the fact that when you call into Rust code you probably want to catch any panics at the boundary because panics that cross the boundary abort your process and we do some nightly unstable stuff today in Skylight to make that work. The correct answer is to have a catch panic solution that is stable and maybe I'm speaking out of term but I think that that's coming soon or eventually. And then there's another thing which is like writing an external function that is meant to be called by people who you don't trust at all and you want to like take your pointers and convert them, first convert them to options and then check to make sure they're not nulls and do other checking and I think that's totally a thing you might want to do but I think it's a different kind of programming, right? This is the kind of programming where you want to use the Rust type system as a way of expressing the contract with C code and that's a, I'm writing a library that's pretty paranoid about who's calling me and whether I trust them to actually follow the rules. So yep, not covered. Thanks.


Welcome to Tallulah, Mexico. Bitcoin has broken out from the channel that we have been watching for the last couple of weeks. This move signifies a bull flag breakout, which gives us a price target of $72,000 for Bitcoin. And it also gives us a price target for Ethereum of around $2,200, between $22 to $2,300. This is setting up April for a great start and what is already a historically bullish month for Bitcoin. So stay tuned so that you can see how we can get to this price target of $72,000 and how you can maximize those profits. Hey, welcome to Bitcoin Daily, bringing you guys the best tips, tutorials, and ideas to help you guys become profitable and successful traders. The goal of this channel is to empower you guys with the knowledge and resources to put it all together and take you up to that next level. So if you guys are new here, make sure to hit that subscribe button. If you guys have been here before, then you already know, smash the like button and don't forget to turn on the notification bell so you know as soon as we post videos five times a week. All right guys, so the first trade setup that we gave you guys on Friday's video was this entry right here above 55K. So if we look back at Friday's trades, that first entry is at 55K and that has run up all the way as high as, what was the high here, $58,496. So basically 58.5, but let's say that you took profit at 58, which is where it's currently at right now and you entered at 55, that puts you at about 54, 55% profits if you use 10X leverage like I did. That next entry that I gave you guys on Friday's video was at 57, so above 57, I told you guys that I was looking for entries there. As you guys can see, it broke right out of that area. Hit that 57 and went all the way up beyond 58. So if you guys took that trade, you would see here that you would have done about 17.5% profits if you use 10X leverage on that trade. If we take a look at Ethereum here, then you can see that our entry that we gave you guys for Ethereum was $1,700 and it's gone up well over 1,800 right now at this point. But let's say that you took profit at 1,800 exactly, that gives you about 30% profits on that trade if you use 5X leverage with us. So first off, let's go ahead and dive into Bitcoin's chart and see exactly what has been going on over the last few days. So as you guys can see here, over the last days we've been slowly grinding right back up. We hit this resistance, which was at descending the top of that channel. It was the top of that channel that was at descending line right there from this channel that we had got rejected on multiple times, right? And we got that breakout. So that's the breakout that we were speaking about on Friday. So we said that we wanted to see this breakout and now a break above this 58 level. If as long as we stay here at 58 and we break above it, then we should be expecting to test this 60K area. A break above that of course should lead us to 62 and then 62 should lead us to our price target. As you guys can see here is currently $70,000 above $70,000, right? So of course we already spoke about why and how we got that price target of $70,000, guys. If you did not watch the last video, make sure to watch it. Today I am on my phone. I'm recording on two different phones. So I'm a little bit limited to what I can do and what I can show you. So I'm not gonna go over it again, but just know that basically the way that we got to this price target is by using that bull flag theory on what happens when there's a bull flag. So basically that's a big impulse move up. Then you measure the bottom of the impulse move to the top of it. And that gives you this measurement right here, which basically tells us where that next price target is for Bitcoin. You can see on the Fibonacci levels here that we're currently sitting right at the 23.6% level right there. So that's a good support right there that's currently holding us. As long as we hold above that, then I am expecting to hit 60K at some point, probably very soon. Of course, prices don't just go up, just like we saw right here, moved up, then it consolidated, moved up, consolidated, moved up. I'm expecting consolidation here and then continuation up.   And now we're seeing little mini bull flags as we grind our way back up. So I'm definitely expecting to be hitting a 60K very, very soon, probably this week. And if we can break through 60Ks, you guys saw we got rejected here a bunch of times. If we could finally break through, then we should be hitting that $62,000 area, which is currently the all-time high. And I believe we should be able to break above that $62,000 area. So right now our next resistances that we're watching is 60K and 62K. Those are the only ones left on a break above 62 that should take us up to around 65K possibly. And then we'll see what happens from there. But I'm definitely expecting in April, Bitcoin at $70,000 or more. If for any reason we were to go down, then we can see a retest of this channel right here. So that support is gonna be right at that 55K level. If for any reason we went lower than that next support level, of course it's gonna be that 52 and that $50,000 range. In Ethereum, we're basically seeing the same thing as we're seeing in Bitcoin. As you see, we just broke out of 1800 and hit that 1830 mark. We should see continuation up. And like I said, on Friday's video, my price target here with this bull flag breakout is going to be right up here. That's just over $2,200, just under 2,300. So that's gonna be my price target there. I'm expecting to see that once we break that previous all-time high, which is just, wait, it's actually not that over here. The previous all-time high was just around that 20, almost at 2,100 right here. So it's been a while since we hit that high. Ethereum's been kind of cooling down for a while after that, but I think April is definitely going to be the time to retest that all-time high and break that all-time high to new highs. My price target again for Ethereum is 22 to $2,300. Our next resistances in Ethereum right now that we're watching is basically going to be that 1,900 level, 1,950 as you see, we got rejected there last time. And then of course that 2,000 area and the previous all-time high, which was around that 20,50 area. If we see any pullbacks here short-term, then we could be testing the top of this channel. That would probably be back down around that 17,20 area. If we were to go lower than that, then I expect some support around that 1,660 area. And beyond that, then we're looking at supports kind of down here, we're bounced last week right around that 1,600 to 1,550 area. Alrighty guys, so so far we've covered the trade recaps from the weekend that we made some very handsome profits by the way. Then we did an analysis on both Bitcoin and Ethereum. And now we're going to cover some trade setups that we're going to be watching this week to make all of us, all of you fabulous people, some profits. So let's go ahead and jump right in. But in order to make these profits, the one thing that you must do is like this video and be subscribed to this channel. If you're not, if you don't like this video, then you don't believe enough in Bitcoin's price to go up and the Bitcoin's price might not go up. So make sure to like this video so that we can all ensure as a community that the price of Bitcoin will go up to new all-time highs. Alrighty guys, so let's go ahead and jump into some trade setups. The first thing that we're looking at, of course, is Bitcoin. Now looking at Bitcoin here, the levels that I'm interested in currently is a break above this previous daily high. So that daily high is just under $58,500. So I am setting up new trades, breakout trades above $58,500, okay? So of course the target for that one is going to be $60,000. So you need to be taking profit on the way up there though. Don't wait for 60,000, take profits as it goes up because we might get rejected before we hit 60,000 and you might lose out on those profits. So you wanna make sure to be taking profits up on the way and using a trust out there. The next trade setup that we're going to be watching of course is a 60K entry. Guys, if we break above 60K, as you can see here, it should lead us back up to that previous all-time high. Now, there is possibility to get rejected here and to have a fake out, so be careful with that. But I think that this time around we should see a break above that which should lead us to that previous all-time high. And of course, if we break that and get to that previous all-time high, there's a high chance of also breaking that all-time high and setting up new all-time highs. So those are the two other breakout trades that I'm watching in Bitcoin this week. A break above 60K and a break above the previous all-time high, $62,000. Now, if for any reason we head down, then I'm looking for re-entries around that 57K area and down at that 55K area. So 57K, remember, the way that we like to enter this trade is not on the way down, we wanna enter it on the way back up. So if we see it test under 57, we're waiting, we're not gonna enter it as a drop, we're gonna wait for a bounce and enter on the break back to the upside. Same thing with 55, if we see it test 55, we're not looking to enter on the drop, looking to enter on the bounce back to the upside. And last but not least, of course, we're gonna be watching Ethereum. So the first one let's talk about is 1800. So currently we're above 1800, but in the event that we went back down to 1800, I'm looking for a trade there that's a good trade setup that I like to take. Same thing here though, we're not entering it, on the drop we're entering it, on the bounce back up. That next trade entry that you can take here is a breakout of 1850. I like that number 1850, we saw a rejection there last time. I believe that if we break that, we should head up to 1900. So of course 1900 is gonna be the next break above. Then above that we're looking for a breakout above 2000, which should lead us back to our all time high. And of course a break above all time high is always a good trade to enter. Alrighty guys, I hope you guys have enjoyed this video. Today we covered the recap from the weekend. Bitcoin had a big move that exploded above 55K, which is the entry that we gave you guys on Friday. So I hope you guys caught that. If you guys didn't catch that, don't worry we did a new analysis on Bitcoin today as well. And we covered some trade setups for you beautiful people. So as you guys know, in order for these trade setups to work, you guys have to be subscribed to the channel and you guys have to like this video. Like that we show Bitcoin as a community that we're ready to see new all time highs. So make sure to subscribe, to like and to turn on that notification bell so that you guys are notified as soon as we post new content. If you guys have any questions whatsoever go ahead and drop it in the comments. I'm always happy to answer your questions for you. As you guys know, I am in San Luis, Mexico. I am enjoying the beaches for the week. So I will be dropping videos all throughout the week that I recorded last week. We're dropping some tutorials. And then on Friday, I will be back with you guys. So until then guys, peace and love.