The following is a presentation of TFNN the morning market kickoff With your host Tommy O'Brien Now Tommy O'Brien Good Monday morning everybody. I'm Tommy O'Brien company alive from TFNN just after 9 a.m. Eastern time Monday morning It's Fed week in the market kicking things off in pretty dramatic fashion. We're accelerating lower right now You have the S&Ps down 95 points. That's 2.45 percent the futures are negative right now You gap lower last night gap lower though you get lower folks We've traded 70 points lower even from that gap things open down about 20 to 25 S&P points They're done about 30 to 35 as of about 7 7 30 and then you can see the slide now We make lows pre-market at about 4 15 a.m. You did catch a pop of about 20 points You see the market getting up about 38 20, but as we come into the opening bell 23 minutes away 38 06 We have yields rising you get the 10-year. I believe it hit 3.28 percent earlier today We'll see where it's at in a moment, but you have yields rising you have the two-year actually getting above The 10-year is that what happened? I think that's what happened We'll pull it up in a moment some funky stuff happening with yields We'll get to that chart in a moment NASDAQ 100 3% negative right now off 354 points. I believe we have One and three quarters percentage point hikes over the next three meetings factored in right now Which basically means 75 potentially coming down the line you got the Dow off 2% So we have the Dow off 2% S&Ps off 2.5 NASDAQ 100 off 3% We got the Russell off 2.6% right now boy quite a weekend quite a morning in Bitcoin I don't imagine this is gonna be the low folks and that's remarkable to say as you're sitting at 23,590 there's a lot of stuff going on in crypto that could send this market lower this morning We'll talk about that in a moment crude hold up relatively well with everything else going on You got crude sitting at $119 a barrel you're negative by $1.64 in crude last week We make a high of 123 18 we've backed off a bit But all things considered with the sell-off across the board right now gold off $28 1847 gold was up to 1882 originally on the Futures open gold gives it all back to 1846 and we jump to Notes and bonds and there is your action now. Let's jump over real quick To see where we're at in the yield right now for the 10-year three point pretty close three point two seven 3.265 to be exact we round up three point two seven percent the yield of the 10-year You want to talk about a move folks just from Friday? You're off two full points two full points from where you were a Friday morning in the 10-year My dad's been talking about it some great cause man talking about rates are going higher and boy You talk about a move we blow apart the previous lows in the 10-year. That was a price of 1708 you now have a 115 handle in the 10-year and as I said just from Friday you were flirting with 118 let alone you go back to just May 25th That's only like three weeks ago and the 10-year has just given up What almost five six full points in the 10-year as we're now sitting at 3.26 percent? Remarkable acceleration across the board right now you get the third year off a full point and 14 ticks That's below previous lows as well you talk about a move the 30-year just traded what now full full four full points The 10-year really getting some action here the short end of the curve really getting some action and yes Let's jump over the two-year treasury yield briefly top the 10-year. That's what it was the first inversion since early April There's your headline Yes, this is your spread okay, so that inversion taking place at about five in the morning Let's see where our 10-year was at that time the two-year the 10-year About four in the morning things consider you can didn't continue to accelerate That's probably what happened as in you saw the 10-year continue to rise that gets the spread back But you see they're basically right now trading pretty similar action Yeah, with the two-year at about 3.22 in the 10-year at about 3.26 percent remarkable man across the board All right, let's get into a little Bitcoin and Ethereum man And we could spend a whole show on this one Okay, we kick it off with Bitcoin Let's take a look at Bitcoin on a weekly folks That is a decisive break of a very important technical area Okay, you talk about a move that move. I have this on my chart. I drawn it. I'm not even sure when they tell you when I drew it If I drew it May 5th because that's the day was ending Nonetheless pretty easy area to see of support and you talk about a gap away and folks I've been saying it you go below this 30,000 area 10,000 is probably coming at you because it was a one-way trip from October of 2020 To really the end of the year you got up to 42,000 you went from 10,000 to 42,000 in the span of about two to two and a half months Okay, there's no reason why I can't give it up technically back to 10,000 Fundamentally, it's a big problem as well. We're gonna talk about that in a moment now Ethereum That's a low Yeah, that's as low as far back as the charts go on the thinkorswim platform, which is February of 2021 I'm not sure. Maybe that's when futures started trading on Ethereum, which is why They're up there Not sure exactly of the fundamentals, but no matter what Ethereum was pushing 5,000 towards the end of last year. You were at a recent high in April of 3600 just like that Ethereum 1220 in that market. All right now, let's tease on some of the fundamental action going on in crypto, man So this is the main culprit out here on top of just everything going on, right? I mean, it's it's almost a perfect storm here for crypto markets accelerating lower massive loss of wealth Everything that's in the growth sector deteriorating in value There's nothing more growth oriented than a cryptocurrency. That's basically worthless, right? I was trying to think today at least when you have stocks like zoom and Roku Getting cut by 80% pullback at least there is some critical value that you can probably assign to that business Especially zoom zoom's actually making money. The multiples got crazy, but they are a profitable company So there is an earnings per share that relates to the company like zoom. There is nothing like that with crypto folks There's no reason why Bitcoin can't be $500. Tell me why Bitcoin can't be 500 now Yeah, you're gonna make the argument that there's only 20 million Bitcoin in circulation, right? But in theory You understand the point. So Celsius Network freezes withdrawals. This is some type of crypto lending network is what I believe it is Bitcoin tumble Monday crypto currency lending company Celsius Network froze withdrawals and Transfer citing extreme conditions in the latest side of how financial market turbulence is causing distress That triggered a huge slide, of course Bitcoin trades lower They offer interest bearing products to customers who deposit crypto currencies at its platform now We're gonna talk a little bit more about that. I Think they were pushed in 16 to 18 percent folks when you see something too good to be true It usually is and it almost always is you're seeing that play out over and over and over in crypto I'm gonna pull up some of the quotes. Maybe they're in here. Are they Celsius raised 750 million dollars in funding late in November from investors They just basically went BK probably folks Now this gets even further. Okay, because we're gonna tease as we get into this break And I'm just pulling stuff as this story is breaking folks And I don't have the fundamental knowledge in this arena to confirm this stuff But now you get that Celsius moved more than a quarter billion dollars to FTX before halting withdrawals So people are saying were they moving around money before they did that and then we get into Binance. That's right We're gonna talk about it. We'll be right back folks In a time of booming inflation we are purchasing powers eroded. There's no better place to protect your harder and money than ain't gold Vista golds flagship asset is the Monk Todd Gold project in the northern territory of Australia This is Australia's largest unveloped gold project. We are talking a world-class gold project in a tier one mining district This is a large-scale low-cost project with significant existing infrastructure in a politically safe and friendly mining jurisdiction Vista gold just completed the Mount Todd feasibility study Which resulted in a seven million ounce gold reserve in a 16 year mine life All of this combined with the approvals of all major operational as well as environmental permits This distinguishes Mount Todd as an attractive Devious party ready development stage gold project. This the gold trades on the New York Stock Exchange and the symbol VGZ Everything in the universe is governed by the Fibonacci sequence This mathematical principle is responsible for everything from the most aesthetically pleasing artwork to patterns in the stock market To stay on top of stock patterns You can take advantage of sign up for the Fibonacci 24-7 newsletter at tfnn.com when you subscribe You'll get a weekly report from veteran day trader Larry Pezzavento on stocks You need to pay attention to and you can trust Larry's analysis after all He's got 45 years experience as a day trader Larry will also provide daily charts videos and data on the key markets that he's tracking Expect notifications from Larry on market movement You need to act on at any time first time subscribers also get a 30-day money back guarantee If you're not satisfied, let us know and you'll get a full refund within 30 days of signing up Subscribe to the Fibonacci 24-7 newsletter today tfnn.com educating investors Steve Rhodes started his trading career as a student almost 20 years ago and the student has now become the master Steve won the prestigious timer of the year award in 2018 and barely missed that mark again in 2019 Finishing at number two for the year an amazing accomplishment Steve Rhodes is committed to sharing his techniques and knowledge with anyone who wants to learn And he shares his vast amount of trading knowledge every day in his mastering probability newsletter Steve's award-winning newsletter Mastering probability is delivered every trading day with updates throughout the afternoon sign up for Steve's market newsletter Mastering probability and you'll receive access to seven of Steve's educational webinars Absolutely free at tfnn all our newsletters come with a 30-day money back guarantee So you have absolutely nothing to worry about visit tfnn.com and try mastering probability 30 days risk-free today tfnn educating investors Welcome back folks. So we jump right into it finishing up So the headline story out there is that Celsius a lending crypto firm that was offering Interest rates of 16 to 18 percent on deposits Just stops doing business for right now as they're not going to process withdrawals They freeze the network then you have a story about buying that's we're going into but there's story out there as well Talking about you know You can keep track through the ledger of some of the transactions be interesting to see how this comes out that they are Removing some of the money out of Celsius to an exchange FTX before they were halting those withdrawals They are supposedly pausing those withdrawals to quote-unquote stabilize liquidity although speculators of course saying maybe they've been moving large amounts of whether it's Bitcoin, Ethereum and other cryptos whilst simultaneously pausing withdrawals for users and Then you get into the fact that where is it? Yeah, Binance CEO Says that they are temporarily pausing of Bitcoin withdrawals on Binance due to a quote-unquote stuck transaction causing a backlog Not sure how that plays out fundamentally in terms of the reality of that being the actual case or not, okay Now when you get into it folks you talk about companies I gotta find I got so many articles up here But you talk about micro strategy. Yeah, here it is. This is good. No, that's not it either Yes, here it is. Okay So micro strategy, right? They got all the Bitcoin. They're down pretty dramatically. Of course with that going on Was their symbol MSTR Yep, that's gonna be it. You're down to 144 today. Okay from 200. So you're gonna take what is that? 25 2027 28% loss don't touch this thing folks Okay, cuz here was what you got to know the CFO of micro strategy on a potential margin call 21,000 is the red line that they got to put up more money folks and we might be there in no time man Okay, so the CFO said during the first quarter conference call When 21,000 was probably at least something they were hoping it was not coming into fruition That only the Bitcoin purchased against it stockpile were subject to a margin call now the risk of really Are that we would have to contribute more Bitcoin? Now as you can see we mentioned previously we have a quite of uncollateralized Bitcoin So we have 95,000 unencumbered Bitcoin So we have more that we could contribute in the case that we have a lot of downward volatility Which we're having today, but again, we're talking about 21,000 before we get to a point where there needs to be more margin or more collateral Contributed they're having a discussion this morning folks about more collateral for micro strategy You're seeing the stock down almost 30% right now. You take a look at the longer-term chart. So you're opening at 140 Okay, which is basically where we had liftoff I mean look at 140 is September of 2020 folks Bitcoin was trading at 10,000 in October Okay, so Bitcoin is trading at 24,000 right now and this thing is going to be trading back to September prices I would not be touching this thing right now anytime. You're dealing with a borderline case of potential margin calls in the crypto sector now I Don't understand the fundamentals well enough But I do understand what goes on in that industry left and right to know well enough that when you have a crypto firm saying they have all this Bitcoin that's unencumbered. Okay, they are a public company. So that's supposed to be accurate but man there's a lot of ways that you can play funny money with these cryptos and What happens when they need to make some margin calls and what happens folks if they don't want to put those Bitcoin up Or what happens if somebody's not going to give you the collateral you once thought 95,000 Bitcoin was Okay, 95,000 Bitcoin whenever they were having this conversation was probably worth almost 50% more than it's worth right now I'm not sure the date of this, but I'm just even saying if you go from 30,000 to 20,000 right Those 95,000 Bitcoin lose 33% of the value But then Bitcoin would have to go up 50% to come back to that same price level So you don't have as much collateral as you had because your collateral is crypto Crypto is crashing and your whole point is that you're going to be able to use your crypto to collateralize The crypto you've borrowed to buy Really think about that before you ever think about investing in this company folks. Yeah, you're going to see some bounces I'm sure along the way Excuse me, but 21,000 if 21,000 Creates a margin call crisis for this company. You think there's any traders out there They would love to push crypto Bitcoin down to at least that price point to see what starts happening and to see maybe if they get some forced liquidation in Terms of micro strategy. That's what I would try and do. I mean you got players all over the world folks All right market manipulation is illegal, but I don't even know how that plays out in crypto I don't even think that's the case In crypto, I'm sure the SEC might have a different debate on that, but you get the point Okay, micro strategy. They're in big trouble man. They got margin calls at 21,000 Bitcoin just crashed So 23,000 380 and as I put it on this chart man, you're basically probably going right back to 10,000 There's nothing other way folks you gap tire you gap and lower This thing's been having support for the better part of a year and a half at this 30,000 price level and just like that You go south now. Let's check out Coinbase this morning and how about the market getting Coinbase out it basically You know all-time highs 429 you're gonna open today at 45 folks. That doesn't have today's action That's a weekly chart down from 350 late last year And there's your drop-off for Coinbase now the same thing with Coinbase goes. Okay, they've talked about the bankruptcy is not gonna happen I don't know if it is But there's no way I'm touching anything with Coinbase ever again By the fact that if they ever do go BK a client funds become General creditors just like you would if you had loaned that company money Okay, never ever would I put my money in that exchange ever again after those words were put into their quarterly filing for Coinbase It's gonna be a tough one on the open folks. The S&P's are now a hundred points right now. You're down 3802 So much for 3,800. This is a critical level when you take a look at where we are we got there in three weeks, man In like nothing. We were trading at 4200 you give up 400 S&P points in not three weeks Yeah, because this is two weeks two weeks and today is Where we got there and this is the level we bounced from last time, you know You want to talk about you put this thing on a four-hour chart? Okay? You go back to where we were here and We just got below that price level the low is on a four-hour basis was 3807 We're trading right now at 3804. I think we may have gotten below that price level intraday But you're seeing it in the S&P and we're right back to a critical Fibonacci level you trade below here 3,500 the next price point that the S&P and we'll see how it would trade there the interesting part there is you do have some Consolidation in the later part of 2020 at about 3,500 for the S&P's We'll see where we go NASDAQ 100 Pretty similar in terms of the S&P's you're now back to where it was the 50% now The dicey area here is this is the consolidation area if you want to even call it that along that one-way trip up That the NASDAQ 100 had but about 12,000 could have been an area for support That's where you bounced a few weeks ago for the lows of May. That's where you had a couple tops You could have resistance turning it to support. We're at 11,500 NASDAQ's 100s down 3.1% right now Crazy action folks and yeah, so the two-year had briefly topped the 10-year Let's jump back as we come into the break here and we come back for the opening bell You talk about a day in the markets folks You got the 10-year down a full point right now 115-26 and we're probably talking about markets as we're right back yields Above 3.28% you can see 3.3% today. We saw probably saw it down here 3.3% We're gonna see 3.5% soon in the 10-year Stay tuned folks. We got the opening bell coming up in three minutes. We'll be right back If you want to take advantage of this sector now is the time to subscribe to my gold report The gold report is a comprehensive look at the metal sector as well as the markets that move gold Which is the currency and bond markets new subscribers get a 30-day money back guarantee So you have nothing to lose every Monday morning I published the gold report with coverage of gold silver bonds the XAU HUI GDX as well as more than 30 different mining equities To see for yourself the types of profitable trades that are recommended within the gold report sign up now by visiting TfNN.com don't miss out on the next great gold trade sign up today TfNN has just launched their new trading room the Tigers Zen hosted at discord TfNN has been educating traders for more than 20 years with live programming hosted by a variety of professional traders during market hours And now they are expanding their reach with the Tigers Zen available to all Tigers and Tigris's for just one dollar for the year There's no cash or added costs when you join our community of traders in the Tigers Den you can look over the shoulders of Tom O'Brien and the other TfNN hosts while they analyze charts during their live Tiger TV programs and join an interactive trading community with hundreds of members exchanging ideas interact with other Tigers and Tigris's as they share trading ideas news analysis and discuss the market action all Trading day even at night and on the weekends the Tigers Den at discord is accessible on mobile or tablets as well So it's always at your reach to sign up today and become a part of this educational community of traders Just visit the front page of TfNN.com TfNN is excited about our new software charting program the art of timing the trade charts in Collaboration with Tom O'Brien and using his best-selling book the art of timing the trade your ultimate trading mastery system David White has programmed an outstanding piece of software that will complement any trader's methodology Using this first-of-its-kind program the art of timing the trade charts allows you to scan thousands of stocks for Fibonacci Formation setups including guard lease ABC's butterflies and much more the art of timing the trade charts is designed to help you when Scouring the markets for stocks just beginning to form the trading patterns that many investors spend days weeks or even months Searching to find and right now. We're offering licenses available at only $79 a month. We are so confident that you're gonna love this new charting software that will even give you a 30-day Unconditional money-back guarantee don't miss out on this incredible new piece of software get your copy of the art of timing the trade charts today by visiting TfNN.com This segment is brought to you by think or swim for more information Just click the think or swim banner on the front page of TfNN.com Welcome back folks We got markets open and you have the S&P opening down 100 points on the dot at 38 oh two We're trading right now down 2.5 percent in the S&P's Trading on down an even 3% in the Nasdaq 100 and you were trading down 2.1 percent the dial Russell right now off 2.7% Bitcoin Opens the session down 19% at 50 down $5,500 we'll call it Ethereum down 27% talk about an acceleration man 12 14 crude holding up relatively well at 119 right now We got some dollar strength today. We got rising yields You get the gold contract pulling back negative 37 dollars right now at 1838 and there's your 10-year note and bond you get the 10 year right back to near the session lows And we did we just hit three point three one percent three point three one percent on the 10-year yield the highest since November of 2018 jumping back to those charts in terms of the numbers that we were at in terms of three year one year two year five ten and thirty Excuse me. You see the two year three point two two the one year two point six eight Look at the jump that these things have had just in the last session You get the one year and the two year up about 17 basis points the 10 year up about 13 basis points The 30 year up about 11 basis points man these moves the Fed It's gonna be an interesting press conference on Wednesday. Are they gonna come with what are they gonna come with man? They're gonna come with 50. It's definitely a discussion. They're gonna come with 175 and Let's get over to that conversation bond yield surge with Fed bets well Curve flags recession risk Yeah, could you get in right the third year right now? Only a three point three the ten years only a three point two meanwhile you get the five year three point four You have the two-year inching towards the Ten-year yet again across the board Markets price in 175 points of Fed tightening by December decision the two-year had jumped to the highest since 2017 on that number and you got the yield curve inverted as the Treasury futures volume leaped on the increasing concern that tighter monetary policy will take a bigger toll on economic growth and yeah 75 is in the Conversation folks markets are pricing in to fit me. It's just amazing to say For where we've come and how we've been used to free money for so long The market is pricing in 50 basis points 50 basis points and 75 basis points at the next three meetings That's following a hike of already 50 basis points and 25 to kick things off boy They're late to the party man 25 to kick things off. I understand the war was raging That was the concern that probably gave them a bit of pause on the on a liftoff of greater than 25 But that's a decision that obviously was late to the party The Fed has not hiked by three-quarters of a percent since 1994 they haven't done the 75 That's gonna be a lot of the conversation I imagine in the press conference. We'll see what chairman Powell has to say If they Hike on 75 Why is he doing it? Okay? What's the next course is 75 on the table on the next meeting if they don't like it 75 We'll see where that goes. I don't know man. This this market this inflation I was talking about on Friday the CPI number comes in hot and I mean I talked about it's almost a little bit of a game changer now game changer We might have been there already as in the game did get changed the game got changed to the tune of 350 S&P points folks. I can't even believe I'm saying it 350 on ballparking. All right, you want to be exact? 4144 to 3798 Was that 346? S&P points over the span of basically 48 hours to trade you're talking about from early Thursday to early Monday Right, we got two full trading days in an overnight session in there and you give up 350 S&P points So yeah, that's an eight what 9% haircut in this index just over since where we were at 7 a.m.. On Thursday That may be the repricing of a different game as in the market trades lower on Thursday comes into the CPI With a little bit of fear things are confirmed for that fear and we have inflation that actually has peaked in June The whole rhetoric was that potentially we had peaked in March. That's not the case Excuse me. We had peaked in June. Well, that's as of now. Where do we go from here? Are these Rate hikes going to have the effect that the Fed wants them to I'm not sure And we got a lot of influences in this market right now having to do with war having to do with energy prices having to do with just electric prices heating overall and Then you have supply chain issues going on with whether it's the war going on with whether it's Still disruptions from COVID going on. It's not a normal market folks where Financials and pricing is just trading off of the cost of money in terms of interest rates That is not what's going on. I'm sure the Fed understands that whether they understand that to the degree of what's actually happening I think none of us really know until we see this play out and and and we see that Forward progress, right? I mean, it's a great point. Yeah and talk about unemployment rises. We have such a strong job market That is going to lead to wage increases rightfully so because costs are Extremely high So that's going to lead to wage increases There's a very tight labor market and as long as you have dramatic wage increases going on And you have everything else going on with energy and with food prices Which I know isn't in the core number, but the core number was still it what six something percent, okay? Airfare is through the roof. There are things that are through the roof that a 50 basis point hike isn't going to bring down the Fed's not going to hike by 75 basis points on Wednesday folks and Delta all of a sudden is going to drop their fares by 20 percent, which will contribute to the CPI number That's not what's going to happen. So that's the worry right now in this market Now we get over To some of the risks Goldman and Morgan Stanley surprise surprise they tell us now That stocks don't fully reflect the risks. I would say they didn't reflect them that well at all at 41 50. Okay, 3800 It's a little bit fairer at least a little bit more fair. I should say Depressed consumers a key risk to the US market equity valuations are far from depressed That's Goldman's constant talking about Even after the sell-off equities are not fully reflecting the risks. I've been talking about it before folks You don't have to predict a recession. Okay, you have to All you have to do is assign a probability to the range of events that could occur It's it's to relate it back to poker Okay, cuz I played a lot of poker and there's similar actions that were gambling on the market folks If you're trading talks long long-term investing Take some of that gambling out of it You're still putting money at risk for future profits, but you put your money in a valuable company There'll be volatility and in the long run that company will grow in the short term a lot of it's gambling And in poker you have unknowns. Okay, you don't know what the holdings are of Your opponent. Okay, so you can't be certain people or people say You know, I knew he had a A bluff here or something like that and I called or I knew you had pocket aces and that's why I fold it Okay. Well, what you do is you assign a probability. You say, okay, there's a 25% chance this person has this range of hands There's a 25% chance this person has this range of hands and there's a 50% chance that they have nothing in their bluffing in The market You should be assigning. Okay, there's a 25% chance That inflation rages for the next six months if I can't get it under control They really ramp things up to just absolutely crush inflation and hurt the market, but it's worth it get things back in tow You know, you assign a probability to the range of events that can occur And that is the way you want to look at things as opposed to trying to know that you're going to be right because we're all Going to be wrong folks. Okay, so you have to assign probabilities And you have to at least understand I think we all do it's tough to recognize in your head But there's at least a probability here that things are very very difficult over the next year that inflation persists energy prices persist Services sector is still on fire Causing raise rising prices in the service sector, right? And meanwhile we're sitting at 3800 We're just back to where we started the year last year in 2021 folks. Stay tuned. We'll be right back Are you in the market for buying or selling real estate in the Bay Area? Including the surrounding St. Petersburg Tampa and Clearwater markets Tiger real estate LLC is a firm that has extensive experience in the Tampa Bay area Whether you're looking to sell your current property for maximum value or you're in the market for a second home or investment property Tiger Realty has the experience across all areas of real estate in the Tampa Bay area to help buyers and sellers make the most informed Decisions across all price levels from the price You should be paying per square foot in certain up-and-coming areas to the type of cash flow investment properties are capable of creating Tiger real estate can help you make the best decision when it comes to all areas of the market before you make one of the biggest Decisions of your financial future call Tiger real estate LLC today at<PHONE_NUMBER> Or email us at tiger at TFNN.com that's<PHONE_NUMBER> Call us today The technology around us is changing every day with so much happening It can seem impossible to keep up with all the information David White's investment newsletter the technology insider is designed to give you all the information You need to understand the technology that shapes today's markets and tomorrow's future David White has made his living staying on the cutting edge of technology His weekly newsletter will give you specific recommendations for value tech stocks as well as entry prices Target prices and stops to set for each trade Dave delivers his weekly newsletters every Friday with updates throughout the week You can get the technology insider at TFNN.com for only $37 and 50 cents Sign up for Dave's newsletter the technology insider and get an inside look at everything the technology sector has to offer Try it risk-free today with our 30-day money back guarantee TFNN educating investors Will the S&P 500 continue to climb for bold trades on U.S. large cap stocks in either direction trade SPXL SPUU or SPXS Directions daily S&P 500 bull and bear leveraged ETFs Direction leveraged ETFs an investor should carefully consider a funds investment objective risks charges and expenses before investing a funds Prospectus and summary Prospectus contain this and other information about direction shares to obtain a funds Prospectus and Summary Prospectus Call<PHONE_NUMBER> or visit Direction investments comm a funds Prospectus and Summary Prospectus should be read carefully before investing an investment in the funds is subject To risk including the possible loss of principal the funds are designed to be utilized only by sophisticated investors such as traders and active investors distributor four-side fund services LLC This program is brought to you by Vista Gold traded on the NYSE American and TSX under the symbol VGZ Welcome back folks. We're taking a look at ARC ARC down another six point four percent right now checking out some of their largest holdings You have zoom shares down four point four percent right now Roku another one of their biggest positions down seven point four percent right now Think about the move that this thing had to 105 be careful in these equities folks You can put some money into them. You're trading with high volatility This is some high volatility market gambling you have going on in these equities. What I will say is The reason why that thing popped up last week was on the talk that potentially I guess people are talking about At what was it at Roku that they might be acquired by Netflix or maybe at Netflix they were talking about they might acquire Roku a Lot of speculation not a lot of details. You're back to seventy six dollars Remarkable you are back to basically COVID lows for this equity you jump over to the analyze tab and talk about a company value to ten Billion dollars right now at some point they will become attractive folks because they are the gatekeeper for something like 66 million households They haven't in here. Maybe they do. I'll try and pull it up at the next break In terms of the number of customers that they have now I'm biased because I'm a customer I got like four or five Roku's in my house one in each hot in each bedroom But if you're gambling and you're thinking you have it you're down seven percent today even from where you were last week So if the market falls apart Roku is gonna fall apart as long with zoom along with all of these growth stocks and you're seeing that happen this morning Down another six point seven percent Now checking out Kathy Woods her positions. Now. I noticed when I went to the trades She was even adding to Roku, which was interesting. So you see the trades listed here Twilio. She had some action in what is you? It's that equity Unity technologies And Roku so 135,000 shares of Roku and what's Roku trading at right now 77 bucks So not bad. She puts that into it increases that fund-weighting in terms of Roku You go back to the holding zooms been number one for a while now when it overtook it from Tesla and Roku now number two in terms of Yeah, I'm just looking at what This represents, okay, this represents the fund waiting What I'm trying to figure out here, which gives me pause and again I'm not sure of the complete accuracy maybe is updated that somehow Roku is listed second here But the market value maybe this is because of today. That's probably what it is Yeah, because Roku's down so much that it has the number two spot as of the close of Friday Probably put that market valuation in terms of where it's trading at right now. No because that's trading at 8271 Maybe it's repricing it's at 77 right now. Let's see how Tesla's trading nonetheless Tesla down 4.3 percent 666 Watch out for that 666 and Elon man down 4.3 percent for Tesla shares. We jump over to Twitter See how some of the other equities Twitter down about 2.4 percent right now Facebook shares up no longer meta Excuse me meta shares down 2.4 percent right now Amazon down 3.6 percent Amazon man, you talk about a pullback from where it traded to my goodness 12899 you're at 105 this morning for Amazon I'm a big believer in Amazon the long run folks you jump over to some of the other fang stocks Google shares down 2.1 percent Microsoft down 2.2 percent. We jump to the big dog Apple down 2 percent as well All right, let's jump around some good news for the economy movies are back Jurassic World Unfortunately critics coming out saying that this may be the worst one in the franchise There've been some great Jurassic Park's Jurassic World But there've been some horrible ones too so for this one to be the worst might not be Too enjoyable to say the least but nonetheless, it's a big blockbuster 143.3 million in domestic opening Top Gun Maverick. They add another 50 million I think I saw that I mean Top Gun you're talking about maybe pushing 600 million I'll try and pull that number so far I think it had grossed about 308 million prior to this past weekend pulls in another 50 million at least domestically in In terms of that number now what they do say in here is That internationally Jurassic World has already taken in 245 they brought the total to 390 just like that My friends and I were joking about the the movie saying yeah, it's supposed to be horrible What a bummer it'll still probably take in a billion dollars. It's remarkable man You just do those big budget movies and you get the the value from them You had almost 11 million people coming up to see it around 66% of overall audience saw that one movie now What they say in here though Maverick has continued to draw in audiences. That's Top Gun Just a 44% drop in ticket sales between its second and third week That's not that stop the steep of a drop-off usually there can be a cliff sometimes opening weekend second weekend third You know you're barely left and they talk about because this video Has seen yeah, I'll get the quote However, this game of diminishing returns could be much more severe for Jurassic World They've received overwhelmingly negative reviews from critics and could see a steep drop-off in ticket sales after its opening weekend If word of mouth from moviegoers is also sour. I imagine Top Guns gonna have some staying power Yeah, I you know, I haven't seen Top Gun yet. I want to go to see it in the movie theaters I love Jurassic World Jurassic Park. I love those movies. I'm probably not gonna check it out It isn't it's interesting how word of mouth, right?  He's not quite there yet, especially for a Jurassic Park movie, but not quite there So maybe not even quite for the kids So I'll just wait till that one comes in some streaming service or pay for it online But Top Gun I want to go see that one of the theaters man. It's supposed to be a good one Tom Cruise Check it out. Why not? All right getting back to energy. So the conversation has been higher energy prices in Texas They're gonna feel it man Using all-time record as heat bakes the state is hot folks. It's hot in Florida. I know it's hot across the country right now Depend demand surpassed the record said in August underscores the searing heat rampant population growth Boy, I hope that Texas is doing something to get that under control man because it's only June 13th Folks we got July and August left and those are usually all the hottest months of the summer and the record they passed Was in August okay 74.9 gigawatts sounds like back to the future right how many how many gigawatts? The grids operating normal though and officials say there's ample supplies to meet demand one gigawatt is enough to power about 200,000 Texas homes so you gotta multiply that by almost 75 in terms of what they're putting out right there The record underscores that heat that they have coming up though, Texas regularly tops 100 degrees It's early in the season. That's what I'm talking about man If this is gonna be a rough one Dallas hit 105 on Sunday, Houston's gonna be a hundred and Midland will be 103 We got some humidity in Florida man. You go outside any time of the day You're gonna be sweating, but we don't have that type of heat We got up to about 92 degrees 93 degrees maybe 94 And you know the humidity brings into a feels like that's like 118 or something silly But yeah for the good lovely people of Texas man I hope that plays out in a good way because it is life or death folks 240 people died when you had The system collapsed during a winter storm that was a result of the power grid failing and they have reforms We'll see how that plays out Texas. I mean they get their own power grid, right? They're not attached to everybody else and as a result They cannot turn on and off some of that excess supply when they need it most so we'll see That's a big number All right, this one's just interesting from a perspective of whether it's your retail own perspective But you know, they're gonna be some sales out there folks and it's gonna be interesting to see how this plays out for the secondary retailers like overstock Maybe the likes of more marshals stuff like that Because you're gonna have some excess inventory. There's gonna be some sales We'll talk a little bit about that when we get here. We'll talk a little bit about the dollar as well So you're gonna have some earnings stay tuned folks. We'll be right back Sharpening your skills as an investor is like getting better at playing a musical instrument You have to practice sure, but you also need excellent instruction from experts at TFNN You'll get advice and guidance from the authority and technical market analysis and it's not just dry tedious text either TFNN airs live financial content streamed live on TFNN.com and TFNN's YouTube channel with Tiger TV Live every market day from 8 30 a.m. To 4 p.m. Eastern for free Each host is an experienced trader and gives their take on the market while taking calls and questions live from around the world From the moment the market opens until the closing bell sounds Tiger TV has eight different shows with expert hosts to help you Make the right moves with your money watch online at TFNN.com or on TFNN's YouTube channel and become the investor You were born to be TFNN educating investors You might think that if you want to be successful at trading in the stock market You're going to need a crystal ball after all it's impossible to predict the future, right? Like any endeavor in life before you decide it's impossible get some advice from the experts You might find that it's not so impossible after all for daily market overviews that give you direction on the key indices Selective stocks and commodities Subscribe to the opening call newsletter at TFNN.com The opening call newsletter is written by Basil Chapman creator of the trading methodology known as the Chapman wave The Chapman wave up down sequence gives you an edge in identifying price turns Finding the peaks and valleys and stock prices get the opening call newsletter by Basil Chapman in your inbox every day First time subscribers also get a 30-day money back guarantee if you're not satisfied Let us know and you'll get a full refund within 30 days of signing up TFNN.com educating investors Everything in the universe is governed by the Fibonacci sequence This mathematical principle is responsible for everything from the most aesthetically pleasing artwork to patterns in the stock market To stay on top of stock patterns You can take advantage of sign up for the Fibonacci 24 7 newsletter at TFNN.com When you subscribe you'll get a weekly report from veteran day trader Larry Pezzavento on stocks You need to pay attention to and you could trust Larry's analysis after all He's got 45 years experience as a day trader Larry will also provide daily charts videos and data on the key markets That he's tracking expect notifications from Larry on market movement You need to act on at any time first time subscribers also get a 30-day money back guarantee If you're not satisfied, let us know and you'll get a full refund within 30 days of signing up Subscribe to the Fibonacci 24 7 newsletter today TFNN.com educating investors This segment is brought to you by think or swim for more information Just click the think or swim banner on the front page of TFNN.com Welcome back folks. We have markets basically where you open you're looking at an S&P down an even 100 points right now trading at 3801 Nasdaq 100 you're of 2.8 percent that dials off 600 points That's just shy of 2% right now. We jump to crypto man Bitcoin 23,000 625 you make it to a low of 23,000 270 Ethereum is down 26 percent at 12 31 goal contract right now down 41 dollars There's a move for you on Friday gives it all back today. It's gonna be an interesting day in the markets folks We jump over to Tesla again real quick Tesla shares down 5.1 percent. Don't forget. They have a lot of Bitcoin. I think as well still Where am I come on? There we go. This is the article. I wanted Elon Musk's regulatory woes mount as US moves closer to recalling Tesla self-driving software. This is a fortune article. I believe written on Friday the one point I was gonna point out a friend had shared this tweet earlier The US inquiry to probe suspicions the Tesla's autopilot is designed to auto quit when crashes imminent We'll see how this plays out one of the things that the fortune article makes a point of is that it'd be very difficult for Tesla to be held accountable because most of Their software is still seen as Assistant and there the current autonomous feature are Deemed assistant systems in which the driver is liable at all times, but here's what I will say man When you see Elon say that autopilot was not engaged at the time of an accident check out this, okay? 16 separate instances. This is a quote from that fortune article, okay? When this occurred that autopilot a boarded vehicle control less than one second prior to the first impact So you have autopilot on it aborts it just prior to the accident Basically probably I don't even know I'm not gonna assign basically probably okay It could be for horrible reasons as in they know that right before it if they abandon autopilot They can say that autopilot was not engaged at the time of an accident But maybe autopilot disengages because that's when the user is supposed to take over if it's an assistance that which is what Tesla would probably say The one thing that I really took from this is that when he says it wasn't engaged at the time of an accident That might be an erroneous Misleading statement at best Tesla down 4.8 percent man Stay tuned folks. It's gonna be a wild one S&Ps down 2.5 percent. Thanks so much for starting your day with me Stay tuned. Yeah bass up next


All right, welcome back to operating systems. So today we're going to do the last lecture that will help you in lab two. So if you haven't started lab two already, you should start lab two because you will encounter some issues and you will probably need to sleep on it. If you leave it to the last day, you will be screwed, trust me on that. So I'll try and show you some more ways so this won't be anything really that new. So we'll just play with processes more today and it will be fun. So here is our task and only task for today. So we want to send and receive data from a process. We want to communicate with it two ways. So we want to create a new process that launches a command line argument while this should probably mean it needs to exec something. So we'll see a nicer way of using exec because it was kind of annoying before. I had to do like slash user slash bin LS. It was kind of a pain in the butt. So we'll see a way to make that a bit easier. And then what we want to do with this process is send the string testing to it. Then we also want to receive any data it writes to standard output. So that's probably the easiest thing to do after doing the exec part. So we only need a few new functions. So a more convenient API to exec VE is called exec LP. So it looks like this. So its first argument doesn't need to be a whole path to a file. It just needs to be the name of a program. And this function will automatically search for that program in some default directories specified by this path environment variable. So this would be like things like user slash bin, some other directories, that's where it will look for this file for you. And it is much more convenient. So then the other convenient thing with this function is it doesn't need a large array of arguments. We can just give it C strings and it's a var arg so we can give it any number of C strings we want to represent the arguments and it just has to end in a null. And that's it. We don't have to create an array of C strings so this is less annoying. But otherwise, aside from those two convenient things, it functions exactly the same. Negative one on failure, set error no, all that good stuff. Otherwise, if it succeeds, it starts executing a different program and replaces this process. So our other final APIs that you need for the lab, which you could have looked up, but here we'll actually use them today just in case you don't wanna read. So there is dup and dup2. So what this does is essentially create a new file descriptor that refers to the same thing that old fd is pointing to. So in this case, whatever old fd is pointing to, it will create a new file descriptor that also points to the same thing and it will return you a new file descriptor number that you can also access that by. dup2 does the same thing except it lets you pick what file descriptor you want to replace. So if I want to, if I have file descriptor five or something like that and I also want to make whatever five point to, I also want file descriptor zero to point to the same thing, I could give zero as this argument and this function will go ahead and do some fun stuff for us. So it will close zero if it is a valid file descriptor and then it will make old fd, whatever it points to also point to zero. So it's a bit of an easier way to target what file descriptor we want to replace. So it just makes our life a bit easier and we'll see how to use that. That's it. So now we do the coding example. So how this is set up is you have a skeleton that's given to you and the idea behind this is I don't give you the solution. We come up with the solution and then later if you want it again, hey, it's good practice if you just figure out how to do this again. Or you can watch the recording but that's a whole lot less fun. So what do we have here? So we have our check error helper function that we've been using so far that just checks for negative one and then does that fun exit stuff for us if we need it to. Otherwise in main, it uses command line arguments. So I'm expecting there to be two arguments. So remember with this, you get command line arguments through argv which is a array of C strings and argc tells you how many elements are in that array. So I'm expecting this to be called with two arguments. So the program name by default is like the zeroth argument and then I want the name of a program to run. So if I don't have two names, I return this einval which just means some invalid input. I'll set aside some space for some file descriptors for pipes because if we wanna communicate with a child process and we wanna capture its input and then give it some data, well, we should probably use something like pipes to do that. So after that, I will call fork and I have these little helper functions just to make things a bit more readable. So if it's the parent, it calls this parent function that takes those two arrays and also takes the process ID of the child for us. And then in the child process, it takes those two pipe file descriptor arrays and also the argument that's supposed to represent what program we need to run. And then otherwise it just exits out of main. So right now the parent does nothing and then the child does exec LP for that program. Cool? Cool. So if I go ahead and I just run your name by itself, this is the name of a valid program. If I run it and I don't give it any arguments, it'll tell me what operating system I'm running. So right now it tells me Linux because that's my virtual machine. So you've used this before, right? In lab zero, you did dash R and that told you the version number of the kernel you're using. So hopefully that number is familiar but if you just do uname, you get the name of the operating system. So if I run something like this, what should I expect to see? Yeah, I should just see Linux, right?  That child process does an exec LP and it replaces the child process by uname and then it just prints out Linux and uname would have printed out Linux to file descriptor what? One, hopefully. One, yeah, so it would have printed out to file descriptor one. I didn't change it or anything from before the fork or after the fork. So it would have just, by default, file descriptor zero, one, and two. We've all just been my terminal so I see the same output, right? So if I want to capture this output and have it available in my parent, what should I do? Yep. Yeah, I should make it right to a pipe instead of just the terminal. So I will go ahead and I will use this out pipe FD. So I will call pipe out pipe FD and then say what I'm doing and then check for errors. So after I do this, well, what file descriptor should I open? So I should have file descriptor one, which is standard in, then file descriptor, sorry, file descriptor zero, standard in, file descriptor one is standard out, file descriptor two is standard error. Then after the pipe, well, file descriptor three is going to be out pipe FD zero. Whoops, pipe FD zero. And is this the read or the right end of the pipe? Read and of pipe. Whoa, okay. And then we would also have file descriptor four open, which is the right end of the pipe. All right, so first question to you. So if I do a fork, then both the processes would have those five file descriptors open, right? What would happen if I instead did something, oops, like this? Yeah, so if I did something like this, at the time of the fork, I would have only had file descriptor zero, one and two open. And then after they fork, they become independent and then each of them would call pipe. So each process would be making its own pipe and there's no way to share those file descriptors, right? Happened after the fork. We only get to copy it at the time of the fork. So that is why we have to call it beforehand. So with these pipes, we can't, you know, like there's no name to access them. So the only way to share these pipe file descriptors is through forking, right? So I have to do this ahead of time. So now I have these file descriptors open, great. So if I want to capture the output of the child, what should I do? Read the read end of the pipe. So here I want to just read the read end of the pipe. Oops. Yeah. Oh, if I'm in the child, I want to write to the right end of the pipe. So I want to do something like this. What do I want to write? No, so I want to, I want to write the string testing to this, but first I'm going to capture the output of this. So I want to capture Linux, standard out. Yeah, so well, so U name is writing to standard out, so if I want to capture its output, what should I do? Yeah, read the output of U name first and send it back to the parent. Yeah, I have to call exec LP first and get the result out of that. Like this returns something. So I have to read standard out. So I'm just, okay, let's create a magical buffer of some magical size. So I just want to read to it like that. So use the dupe to make zero the same as five. So zero is standard in and five doesn't four. So I want to make, I want to make zero what? I want to make zero the right end of the pipe. So I make the right end of the, so, so that program is writing to standard out, right? Yeah, so I want, so I want one to point to the same thing as four, right? So I want it to probably look like, what do you say, four? So I want to look like this. Yeah, so I could do check error, oops, dupe two. So what I want to copy is out pipe FD, oops, out pipe FD one, right? And I want to replace file descriptor one with it. So that is that. And then check for errors, all that fun stuff. So that better? Yes, so this read, this would never happen, right? So if execlp is successful, it starts executing another program. So these lines would never run. So I can't do anything with it, right? I lose complete control over it, although this will save me some typing later. So I'll just shoot that up here. All right, so is that it? That's all I have to do. All right, we can run it. That's like kind of promising, right? Yeah, that's pretty good. Yeah, yeah, so what I did here, because of this dupe two, I changed what file descriptor one refers to. So I made file descriptor one point to the same thing as out pipe fd one, which is the right end of the pipe. So I set that up so that by the time execlp happens, right? Whenever I'm executing this program, you're not allowed to change this program. It just does whatever it does, right? And whatever it does is it writes Linux to file descriptor one, whatever the hell file descriptor one is. So in this case, I wanted to get its output. So I'm going to force it to write, whatever it writes to file descriptor one, it writes to the right end of the pipe, and that means I should be able to read it, right? So if I want to read it, I should be able to read it in the parent, right? So I can uncomment this. So now where do I want to read from? Do I want to read from file descriptor one? I could read from four or one, the read end of the pipe, right? So the read end of the pipe, what is the read end of the pipe? Zero, right? So I read from that, I should probably check for errors and all that stuff, but it's already, it's harder to stand up in code. All right, so check for errors, cool. So I could probably print off whatever I got. So I'll print off, so dot star S, because, oh, I'll print out got to, so because whatever I read is not going to be, I'm not guaranteed it's going to be a C string because it just outputs some bytes, it's not going to end in an all terminator, it just is whatever it is. So I can do star dot string, and that way I can give it another argument to say, how many characters are you actually going to print in the string? So I'll tell it, I've bytes read characters to print, and it is filled up in my buffer. So if I do that, type int, yeah, yeah, okay, I will quiet it down. So I'm allowed to do that because ints are smaller than size T's. So if I do that, hopefully what should happen now if I run this? Yeah, I should see print, I should print got Linux, right? Cool, so our parent process, just read some information from the child process by just monkeying with the file descriptors. So was I a upstanding citizen with these file descriptors? No, right? So it is considered very impolite to when you create a new, or when you run a new process, or sorry, when you run a new program to have file descriptors open that are not zero, one, and two. So this is actually quite rude that I have file descriptor three and four still open. So ideally I would want something like that. So what should I do? Yeah, just close both ends of the pipe, right? After the dupe, while I just replace file descriptor one with the right end of the pipe, and I don't need any other file descriptors for the pipe anymore. So I can just close pipefd zero and then close pipefd one. So now I clean them all up, everything is nice and tidy for me. So, yeah, so everything's nice and tidy. If I go ahead and run it again, well, whatever. I get the same thing, but now I feel better about myself. Yeah, so the child is only going to write to file descriptor one right now, right? So it's not going to do anything with file descriptor three and four because so when it reads from the output of the pipe, so when it reads, that process is reading from what file descriptor? Out pipefd zero, no, yeah. Oh, no, this is the child. Oh, so the question is, if the child closed pipefd zero, how can the parent use it? So remember, file descriptors are independent in each process. So if the child closes, any file descriptors the child closes, doesn't matter, the parent still has it open, right? So, nope, I didn't close in the parent. So here, all I did was created the pipe here. I created the pipe and then I called parent. So I didn't screw with the file descriptors at all. So when the parent starts running here, it looks like this. Yeah, so if I'm being polite, I should probably close them also in the parent, right? So should I just, you want me to just do something, what? Like this, after everything, I can close the right, but not the read. All right, does that make us feel better? So in this case, we don't have to, but we'll see quickly that my advice is something you should listen to. So this is good practice, so this will save us probably, hopefully. So I close them as soon as I don't need them anymore. So the parent doesn't need them, right? Cool, so now if I run something like this, it should be all good. Okay, cool. So the other part is we want to send information to that process, how do I do that? Yeah, a signal. What about if I did like this?  Well, now I know how to get your attention. Yeah, rewrite standard in, right? So I would ideally like this process to whenever it writes the standard, or sorry, whenever it reads from standard in, it is reading from probably a pipe that I can send data through, right? So I could send it a signal, but like cat, all it does is read from file descriptor zero over and over again, right? It probably won't do anything with the signal if I send it, except like die. So I can probably kill it, but I can't get any information out of it. Cause right now, whatever I type here, if I hit enter, well, I'll see it because I capture the output of it, right? So if I want to capture the input of it, probably need another good old pipe. So I will do this. Yeah, sorry for hitting the microphone. All right, so if I do something like that, is that all I need to do, set up another pipe? Yeah, I also need to read from it, read from it. Who needs to read from it? Yeah, this process needs to be reading from it, right? The child process. So if it wants to be reading from it, what should I do? Another dupe two to standard in. So what do I want, whoops, not nine. What do I want to be standard in? Let's see, I guess that doesn't help. So there's in pipe FD. So do I want one or zero? So this is in the child right now. So we're replacing its file descriptor zero and it's just going to read from zero over and over again, right? So zero, yeah. So we want to make it read from a different pipe. Yep, how do you see the output? So when I ran it, like, why did I see that? It still worked. Why did it work? So why did this work? Anyone want to explain why this worked? Yeah, exactly. So because I didn't change standard input, it was still the terminal. So when cat ran and I typed something, it read from the terminal and then it outputted that.  It just reads from zero, writes to one. So it would have written to one, which I replaced by the right end of the pipe. So it filled that pipe up, which is just like memory managed by the kernel. And then my parent process read from that. So then I got, my sound effect was less good, but you get the idea. So the parent process read whatever I wrote. So now, so this looks good. Am I done here with replacing this? Close, right? I should probably close because it's considered rude. So I can do this much faster by hacking. There we go. So now this is all cleaned up, right? So before this exec LP, only these file descriptors are open and it looks like this. So zero is the read end of the in pipe and one is the write end of the out pipe. And that's it. Every other file descriptor is now closed. So that's good. Yep. Do I close one? So here I just made file descriptor zero, also point to the read end of this pipe and then I don't need any of the other file descriptors open because these are like file descriptors three and four. I don't need them anymore. Yeah, so just by convention, it's considered rude not to keep them open, right? Because by convention only file descriptors zero, one and two are supposed to be open. Otherwise it's considered weird. And remember we had that weird situation where we left a right end of the pipe open and the kernel considered you could still write to it so it would never return from read and we got stuck forever. That's also a reason why. You should just close file descriptors if you're not gonna use them. Just like memory, except unlike memory, all you get is like a segfault, which isn't that bad. You can see what happens. In this case, if you forget to close, well, what did we discover happen last time? It just kind of hung forever, right? It just got blocked. It looks like an infinite loop, although it's not an infinite loop. It's harder to debug than an infinite loop. So that's fun. Okay, so are we done? So that looks good for our child, right? So the child is currently, we can't change whatever this program does, or it's going to always read from zero and write to one. So now we did the correct replacements, so that's good. And we also read from this, we also read from the out pipe to get its output. So if we want to give it some input, what should we do? Probably write to the in pipe, right? So in the parent, if I want to give it some information, let's say I want, so our goal was to write the string, oops, const, car, star, message. So I want to write the string testing. So I want to send that string testing to the child process. What should I do? Yeah, write to the right end of the in pipe. So that would be in pipe FD1, right? So I write to pipe FD1, which is the right end of the pipe, and then my child process is reading from the read end. So it should read any information I write to it, right? Cool, so I will give it this message and say, fill it up with, have our main characters are in that message. And let's check for errors, because that is what we should do. Check error, but it's written. All right, so now we check for errors, are we done? I didn't close, yes, yes, what should I close? In pipe one, all right, is that it? Yeah, I could close in pipe zero before, right? So I close any file descriptors as soon as I'm done using them. So the parent does not read from the read end of the in pipe, and it also doesn't write to the right end of the out pipe. So I should close those immediately, and then the other ones I use, I should just close them whenever I'm done using them. So, in this case, we compile it. I still haven't used that, which is fine, but now if I run build sub-process cat, what should I see? Testing, right? Which should be cool, got testing. What happened there? Well, I wrote the string testing to the in pipe, then the cat process read it, and then it outputted that same thing to its file descriptor one, which was the right end of the out pipe, and then I read that information. So we communicated with that process, we gave it input, and we got output from it. Crazy, eh? So, this is, if you, since using this, there's a Python module called sub-process, which basically does this stuff for you. Great for calling programs. Now you know how it actually works. So you can, some of the arguments you can give it, you can say SDN equals pipe, and then you can send input to it. You could say standard out equals pipe, and you can get output from it. Guess what? This is like how the grading scripts work. So it just uses Python sub-processes to call your program, get some output from it, read it, do all that fun stuff. So cool, am I done? No? I need a what?  Let's say I was a responsible parent. I should acknowledge it, yes. Yes, it's a bit violent to kill my child immediately. All right, we're, so if I wanna acknowledge it, I need to call weight. Where should I call weight? At the very end. So I can go ahead and call it here. Declare W status, call weight with the address of W status. Oh, I should also check for errors. Oops, check error. Oh, I wrote this in the wrong order. All right, so I will check for errors.  I'm going to assume that W, if exited, is true. So I'll just assert that that's true. And again, I'm writing asserts because if that is not the case, it's going to blow up and then tell me that that was not true. So I'm also going to assert that W exit status is equal to zero.  So if I violently killed it, that wouldn't be true. So there, am I done? Yeah, so the other thing, exit zero. So what will happen is in the parent, whenever parent returns, it will return from this, go outside then return zero from main, which is the same as exit zero. All right, yep, yep. Yeah, we closed all the file descriptors.  So no other arguments. I'll do something like that because I get rid of that warning, yep. So wait will wait for your first child to terminate and wait PID, you can also do that behavior if you give the PID argument as negative one, otherwise you can wait for a specific child. So in this point, I'm just gonna, I only have one child, I can just wait for it directly. It doesn't matter, yep. So the asserts here are like just a C thing. So whatever you write in there, if it is not true, your program will immediately crash and say that wasn't true and tell you what line that wasn't true. So I put these in whenever I'm making some assumption because I could write more code to handle more cases if it didn't exit, but I'm going to be lazy and just put an assert there instead. So whenever I see an assert, then I know I have to write some more stuff instead of it like failing in some weird way. So it's just a common thing I do when I develop stuff. I'll just write a simple version, write asserts and then as long as it works, hey, it's good. And then if some assert triggers, I know about it and then I have to write more code and have more fun, I guess. All right, so I'm done now. I think so. So if I run this, let's go ahead and what was it called? Subprocess. Yeah, so now I got testing. If I do PID of subprocess, well, I don't have any orphans or anything like that. Everything is all cool. So could I move this weight up here? I will move this down. So is that cool now? Yeah, I got one thumbs up at least. Two thumbs up, three, four, five, no more. All right, we got five. So if I run this, if I go ahead and compile and run this, no problem. Thumbs up, right? What about if I moved it, whoops. What about if I moved it up here? Thumbs down. Why is that going to be a thumbs down? I killed the child, violent. So let's go ahead, let's run it, run it. So let's see. So I'm waiting for the child to exit. When's the child gonna exit? Yeah, what? Specifically, we saw the program, right? It's going to exit when it knows it can't get any more input. So if I wait for it right here, the parent process still has the right end of the pipe open. So it thinks, hey, it could get some input. So read will not return zero, and it will just go on living. So I'm waiting for it to terminate. It's not gonna terminate because it's waiting for me to send input. Catch, double e-duce. So that is not good. So this was good. What's another way to cause that to hang infinitely by just commenting out a single line? If I comment out the right line here, if I want, if I comment out this. So if everyone agree that if I comment this out, that will be a major mistake, believe so. So let's see. Yeah, so now it hangs, right? Because I still, the parent still has the right end of the pipe open. The child thinks it's possible to get some more input. So read will never return zero to signify it can't get any output. And then you will start messaging on Discord and being like, oh my God, my program's broken. I have an infinite loop or something. But really, you messed up your file descriptors. And in lab two, probably nine times out of 10, this is going to be your problem. So that is a warning. So remember what I said, close your file descriptors as soon as you don't need them. Yeah, so yeah, why commenting this out causes bad things to happen? So here, so the child process is just reading from the read end of this in pipe, right? Right? Yeah, so the child is reading from the read end of the in pipe. In the child, we were nice. So it only has access to the read end of the in pipe. So it doesn't have any access to the right end of the in pipe. So the child is clean. Okay, no, not gonna make that joke. So the child is clean. And in here, we close the read end of the in pipe but we still have the right end of the in pipe open. So because this process has the right end of the in pipe open, the child would think like read zero would not return zero to signify that there's no possible way to get input because this process, the kernel will keep track of that and know that this process has access to the right end of the pipe and it could write data to that pipe. So I can't say that no data will ever come into that pipe anymore if I forget this close. As soon as I do this close, then at this point, no process has the right end of this pipe open. And if you try and read from it, well, it would just return zero signifying it's closed, can't get any more input. So the child cat process can just return. All right, yep. If I, so if what took stuff from the terminal? Yeah, so what if the child process was reading from the terminal? So what if, so what if the, yeah. So it was like, you know, you read something. I'm not gonna write this, but you read from like FD zero and then you just write to in pipe FD one, something like that. Yeah, so if you did this, if you just have one right, then that's fine, but it would, you would probably have to write this so that it reads from FD zero and then as soon as that input is done, then it does the same thing where it closes the right end of the pipe because it knows no more input is coming. So you can write that it should behave just like cat did when we wrote it, right? So yeah, you, you, we could do that if we wanted. So then any input we type goes directly to that process. So we could do that and that would work fine. We just have to be careful that eventually we do close this, right? We would only close this whenever we read from FD zero and it returned zero to say no more input. And you know, you can't imagine we could have a long chain of processes that do this. So if one of those processes are screwed up in the chain, one of them is going to wait on some output and just stay there forever. Cool, so we got this all good. Well, don't, don't come crying to me after. So yeah, if you see, hey, my program stuck, you know, I wrote an infant loop. Guess what? You did that. You forgot, you messed up a file descriptor.  All right, let's remember pulling for you. We're on this together.


US dollar Canada has been in a little bit of a sideways trade the past couple of weeks but we have a buy signal that's still active. Right now the market is trading above that 132.13 is our buy entry level and our risk is down at 130.88. The way we've been trading we've been making higher move highs and higher move lows on an intraday basis so that means the short-term trend is a bull. We're looking for this to continue into Monday's action. The upside correction zone run 33.70 to 134.38 is already a correction target area for us but our buy signal has us going all the way up to 134.61 with the dollar strength and the way yields have been rising especially over the past couple of sessions. If we get a breakout this market when it moves and it wants to jump it does so I wouldn't underestimate the possibility of having a nice very big backup balloon underwater type rally.