<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>cache</title>
    <link>https://cache.bwang.io/</link>
    <description></description>
    <pubDate>Sat, 11 Apr 2026 21:32:24 +0000</pubDate>
    <item>
      <title>some projects</title>
      <link>https://cache.bwang.io/some-projects?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[Disclaimer: all the projects mentioned in this post were created two months ago, maybe a month ago. This post was written around that time frame, and then just slowly edited.&#xA;&#xA;Humans have always distinguished themselves via their tooling. To be much more productive is empowering. But admittedly, some existentialist pangs were felt. This post is me building a couple of apps, some used by me daily, some deployed, some proof of concept, all of which are built with Opus 4.6.&#xA;&#xA;---&#xA;&#xA;Chansey - Chansey is a RAG application that takes medical questions, translating them into PubMed queries using an LLM. The answers are classified (diagnostic, comparative, guideline, etc.) and then AI-generated using text from relevant citations. I wanted to build an OpenEvidence clone; this is a Temu version with a much simpler RAG, directly querying PubMed, no caching. You can try it out on chansey.bwang.io&#xA;&#xA;https://youtu.be/lz1E6KupsyU&#xA;&#xA;Diglett - I wanted to find government contract opportunities on SAM.gov. Diglett scrapes SAM.gov, uses LLM to read attachments and analyze potential procurement opportunities. Generate documents/emails to bid on contracts. Interfacing with government contracts is still laden with human involvement. It’s run locally and uses Google Sheets as back-end for someone to manage these opportunities in the future. Why SAM.gov? Website for Canadian contracts is bad and United Nations / UNGM is sort of behind a paywall. I have set up an LLC and made some submissions, fingers crossed.&#xA;&#xA;https://youtu.be/Aox44oR5KMU&#xA;&#xA;Starmie - Fundamental Analysis/screening of global small-cap stocks. After reading posts such as posts from dirt, I have had some success last year picking stocks (see my stale substack). Starmie is my effort to reproduce the process, periodically picking a few small-cap high-conviction stocks. It uses a postgresql db on neon powering Grafana, displaying a few metrics I care about: EV/EBIT, ROIC, NCAV.&#xA;&#xA;Available at https://stonks.bwang.io/ (Deployed version is very slow)&#xA;&#xA;https://youtu.be/WBollqAhYEw&#xA;&#xA;Munchlax - Some restaurants are too hard to book. Restaurant sniper that polls popular restaurants on Resy, instantly booking when the restaurant becomes available. React Frontend. Go (go-chi) + PostgreSQL backend, storing profiles, watches (snipe job), bookings (successful reservations), watch events (event log for status changes). I have used this to successfully book a restaurant in Chicago and I might use it again in the future.&#xA;&#xA;https://youtu.be/Iyvn0x8D8VA&#xA;&#xA;Noctowl - I need more exposure to the Japanese language. Noctowl is a language learning chrome extension by automatically replacing English words on webpages with the target translation. It features anki-esque flashcards, click-to-pronounce, grammatical form matching, and cloud sync via Firebase/Google sign-on.&#xA;&#xA;https://youtu.be/U7k4E_jGXLo&#xA;&#xA;Omastar - A March Madness prediction that uses a 7 feature model trained with XGBoost on historical games to beat “picking the higher seed”. The front-end features a bracket that tracks how the model is currently doing. My bracket is currently under-performing.&#xA;&#xA;Available at https://www.bwang.io/omastar/index.html&#xA;&#xA;Farfetch’d - A personal job search tool that scrapes job postings from many boards. Gemini scores each match and lets you review potentially good matches. Application statuses are also tracked.&#xA;&#xA;https://youtu.be/rte6sBEABkc&#xA;&#xA;Machop - Machop match Polymarket and Kalshi events (fuzzy matched then uses an LLM to exact match), and then surfaces arbitrage opportunities. There used to be trades that were around 50% ROI/year for a couple of hundred dollars in volume, but I’m not sure if you can find that kind of alpha anymore. The video below doesn’t capture the full capabilities of Machop. It was originally entirely in your terminal, but now you can try a read-only version on arbitrage.bwang.io.&#xA;&#xA;https://youtu.be/GRIqz7g0hIM&#xA;&#xA;Machamp - Trading bot that exploits mispriced sports market by comparing model odds to Kalshi odds. It automatically places trades when it detects sufficient edge. Features a dashboard so you can witness model edge along with game state.&#xA;&#xA;Metapod - A Jackbox TV style party platform where a host displays a game on TV and people join the game on their phones using a 4-letter room code. The first game is a single-player adventure game, “Lost at Sea”. The other game is “Confidently Wrong”, a Wits and Wagers style game. This game is functional but lacking sounds and animations that makes it fun.&#xA;&#xA;---&#xA;&#xA;Here are a few more, briefly listed.&#xA;&#xA;Porygon - Visually steps through a btc transaction using the real Bitcoin testnet and testnet4 faucet. Generates a wallet, see your transaction in a block.&#xA;Scyther - Surgical video annotation tool for laparoscopic surgery using CholecSeg8k model for segmentation. Data is bad and my machine isn’t powerful enough so it’s not functional.&#xA;Ludicolo - Inspiration from https://midnight.pub/. Bar simulation where you can sit next to real people at a bar and chat with them (or the bartender who is a LLM).&#xA;Vulpix - Tiktok content generator. Turns google sheet prompts into tiktok drafts. Not live.&#xA;Ninetales - Live-stream clipper. Captions clips and turns them into tiktok drafts. Not enough disk space.&#xA;Tangela - I realized I had an old reddit API key so I used a key to look for trendy topics on reddit.&#xA;&#xA;---&#xA;&#xA;Software is cheap now. The role of an engineer now is a generalist, a problem solver, a token consumer. Understand technology is implied, but we now just need to increasingly interact with the ends instead of the means.&#xA;&#xA;I will continue writing code and building products in the meantime.]]&gt;</description>
      <content:encoded><![CDATA[<p>Disclaimer: all the projects mentioned in this post were created two months ago, maybe a month ago. This post was written around that time frame, and then just slowly edited.</p>

<p>Humans have always distinguished themselves via their tooling. To be much more productive is empowering. But admittedly, some existentialist pangs were felt. This post is me building a couple of apps, some used by me daily, some deployed, some proof of concept, all of which are built with Opus 4.6.</p>

<hr/>

<p><strong>Chansey</strong> – Chansey is a RAG application that takes medical questions, translating them into PubMed queries using an LLM. The answers are classified (diagnostic, comparative, guideline, etc.) and then AI-generated using text from relevant citations. I wanted to build an OpenEvidence clone; this is a Temu version with a much simpler RAG, directly querying PubMed, no caching. You can try it out on chansey.bwang.io</p>

<p><iframe allow="monetization" class="embedly-embed" src="//cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Flz1E6KupsyU%3Ffeature%3Doembed&display_name=YouTube&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dlz1E6KupsyU&image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Flz1E6KupsyU%2Fhqdefault.jpg&type=text%2Fhtml&schema=youtube" width="640" height="360" scrolling="no" title="YouTube embed" frameborder="0" allow="autoplay; fullscreen; encrypted-media; picture-in-picture;" allowfullscreen="true"></iframe></p>

<p><strong>Diglett</strong> – I wanted to find government contract opportunities on SAM.gov. Diglett scrapes SAM.gov, uses LLM to read attachments and analyze potential procurement opportunities. Generate documents/emails to bid on contracts. Interfacing with government contracts is still laden with human involvement. It’s run locally and uses Google Sheets as back-end for someone to manage these opportunities in the future. Why SAM.gov? Website for Canadian contracts is bad and United Nations / UNGM is sort of behind a paywall. I have set up an LLC and made some submissions, fingers crossed.</p>

<p><iframe allow="monetization" class="embedly-embed" src="//cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FAox44oR5KMU%3Ffeature%3Doembed&display_name=YouTube&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DAox44oR5KMU&image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FAox44oR5KMU%2Fhqdefault.jpg&type=text%2Fhtml&schema=youtube" width="640" height="360" scrolling="no" title="YouTube embed" frameborder="0" allow="autoplay; fullscreen; encrypted-media; picture-in-picture;" allowfullscreen="true"></iframe></p>

<p><strong>Starmie</strong> – Fundamental Analysis/screening of global small-cap stocks. After reading posts such as posts from <a href="https://dirtcheapstocks.substack.com/">dirt</a>, I have had some success last year picking stocks (see my stale <a href="https://0xb11.substack.com/">substack</a>). Starmie is my effort to reproduce the process, periodically picking a few small-cap high-conviction stocks. It uses a postgresql db on neon powering Grafana, displaying a few metrics I care about: EV/EBIT, ROIC, NCAV.</p>

<p>Available at <a href="https://stonks.bwang.io/">https://stonks.bwang.io/</a> (Deployed version is very slow)</p>

<p><iframe allow="monetization" class="embedly-embed" src="//cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FWBollqAhYEw%3Ffeature%3Doembed&display_name=YouTube&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DWBollqAhYEw&image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FWBollqAhYEw%2Fhqdefault.jpg&type=text%2Fhtml&schema=youtube" width="640" height="360" scrolling="no" title="YouTube embed" frameborder="0" allow="autoplay; fullscreen; encrypted-media; picture-in-picture;" allowfullscreen="true"></iframe></p>

<p><strong>Munchlax</strong> – Some restaurants are too hard to book. Restaurant sniper that polls popular restaurants on Resy, instantly booking when the restaurant becomes available. React Frontend. Go (go-chi) + PostgreSQL backend, storing profiles, watches (snipe job), bookings (successful reservations), watch events (event log for status changes). I have used this to successfully book a restaurant in Chicago and I might use it again in the future.</p>

<p><iframe allow="monetization" class="embedly-embed" src="//cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FIyvn0x8D8VA%3Ffeature%3Doembed&display_name=YouTube&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DIyvn0x8D8VA&image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FIyvn0x8D8VA%2Fhqdefault.jpg&type=text%2Fhtml&schema=youtube" width="640" height="360" scrolling="no" title="YouTube embed" frameborder="0" allow="autoplay; fullscreen; encrypted-media; picture-in-picture;" allowfullscreen="true"></iframe></p>

<p><strong>Noctowl</strong> – I need more exposure to the Japanese language. Noctowl is a language learning chrome extension by automatically replacing English words on webpages with the target translation. It features anki-esque flashcards, click-to-pronounce, grammatical form matching, and cloud sync via Firebase/Google sign-on.</p>

<p><iframe allow="monetization" class="embedly-embed" src="//cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FU7k4E_jGXLo%3Ffeature%3Doembed&display_name=YouTube&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DU7k4E_jGXLo&image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FU7k4E_jGXLo%2Fhqdefault.jpg&type=text%2Fhtml&schema=youtube" width="640" height="360" scrolling="no" title="YouTube embed" frameborder="0" allow="autoplay; fullscreen; encrypted-media; picture-in-picture;" allowfullscreen="true"></iframe></p>

<p><strong>Omastar</strong> – A March Madness prediction that uses a 7 feature model trained with XGBoost on historical games to beat “picking the higher seed”. The front-end features a bracket that tracks how the model is currently doing. My bracket is currently under-performing.</p>

<p>Available at <a href="https://www.bwang.io/omastar/index.html">https://www.bwang.io/omastar/index.html</a></p>

<p><strong>Farfetch’d</strong> – A personal job search tool that scrapes job postings from many boards. Gemini scores each match and lets you review potentially good matches. Application statuses are also tracked.</p>

<p><iframe allow="monetization" class="embedly-embed" src="//cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Frte6sBEABkc%3Ffeature%3Doembed&display_name=YouTube&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Drte6sBEABkc&image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Frte6sBEABkc%2Fhqdefault.jpg&type=text%2Fhtml&schema=youtube" width="640" height="360" scrolling="no" title="YouTube embed" frameborder="0" allow="autoplay; fullscreen; encrypted-media; picture-in-picture;" allowfullscreen="true"></iframe></p>

<p><strong>Machop</strong> – Machop match Polymarket and Kalshi events (fuzzy matched then uses an LLM to exact match), and then surfaces arbitrage opportunities. There used to be trades that were around 50% ROI/year for a couple of hundred dollars in volume, but I’m not sure if you can find that kind of alpha anymore. The video below doesn’t capture the full capabilities of Machop. It was originally entirely in your terminal, but now you can try a read-only version on arbitrage.bwang.io.</p>

<p><iframe allow="monetization" class="embedly-embed" src="//cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FGRIqz7g0hIM%3Ffeature%3Doembed&display_name=YouTube&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DGRIqz7g0hIM&image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FGRIqz7g0hIM%2Fhqdefault.jpg&type=text%2Fhtml&schema=youtube" width="640" height="360" scrolling="no" title="YouTube embed" frameborder="0" allow="autoplay; fullscreen; encrypted-media; picture-in-picture;" allowfullscreen="true"></iframe></p>

<p><strong>Machamp</strong> – Trading bot that exploits mispriced sports market by comparing model odds to Kalshi odds. It automatically places trades when it detects sufficient edge. Features a dashboard so you can witness model edge along with game state.</p>

<p><strong>Metapod</strong> – A Jackbox TV style party platform where a host displays a game on TV and people join the game on their phones using a 4-letter room code. The first game is a single-player adventure game, “Lost at Sea”. The other game is “Confidently Wrong”, a Wits and Wagers style game. This game is functional but lacking sounds and animations that makes it fun.</p>

<hr/>

<p>Here are a few more, briefly listed.</p>
<ul><li><strong>Porygon</strong> – Visually steps through a btc transaction using the real Bitcoin testnet and testnet4 faucet. Generates a wallet, see your transaction in a block.</li>
<li><strong>Scyther</strong> – Surgical video annotation tool for laparoscopic surgery using CholecSeg8k model for segmentation. Data is bad and my machine isn’t powerful enough so it’s not functional.</li>
<li><strong>Ludicolo</strong> – Inspiration from <a href="https://midnight.pub/">https://midnight.pub/</a>. Bar simulation where you can sit next to real people at a bar and chat with them (or the bartender who is a LLM).</li>
<li><strong>Vulpix</strong> – Tiktok content generator. Turns google sheet prompts into tiktok drafts. Not live.</li>
<li><strong>Ninetales</strong> – Live-stream clipper. Captions clips and turns them into tiktok drafts. Not enough disk space.</li>
<li><strong>Tangela</strong> – I realized I had an old reddit API key so I used a key to look for trendy topics on reddit.</li></ul>

<hr/>

<p>Software is cheap now. The role of an engineer now is a generalist, a problem solver, a token consumer. Understand technology is implied, but we now just need to increasingly interact with the ends instead of the means.</p>

<p>I will continue writing code and building products in the meantime.</p>
]]></content:encoded>
      <guid>https://cache.bwang.io/some-projects</guid>
      <pubDate>Wed, 11 Mar 2026 21:26:07 +0000</pubDate>
    </item>
    <item>
      <title>practical poker</title>
      <link>https://cache.bwang.io/practical-poker?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[Across playing low stakes live and microstakes online, I have won somewhere around 15k in profit playing poker.&#xA;&#xA;I used to have a lengthier post full of EV calculation and theory. This is a much shorter post, more practical.&#xA;&#xA;should I be playing&#xA;&#xA;I recently came across describing poker tilt with Kahneman’s systems of thinking. The first system is automatic, fast, and emotional. The second system is deliberate, slow, and conscious. We use the first system when we are tilted. We abandon rational thoughts, becoming disillusioned gamblers.&#xA;&#xA;I think about 10% of players are winners in the long run. In a small enough sample, anyone can be winning. Looking at this variance calculator, we’d need hundreds of thousands of hands to get an approximate win rate. And even then, a theoretically winning player could still be losing. Therefore, poker makes an excellent hobby but a poor source of income.&#xA;&#xA;Lastly, money. How much money should I have to play? We can&#39;t make any bets if we don&#39;t have money. To calculate the Risk of Ruin of poker, I personally vouch for just taking a sample of your last n sessions, getting a mean/variance, and seeing how many standard deviations we are from the mean. We answer questions like &#34;are these games too big for me?&#34;. F(n) = e^(-2nm/v), v=variance, m=mean.&#xA;&#xA;This is a thread from Linus, one of the greatest cash game players of all time, before his ascent to greatness. To me, he just seems indomitable even during his rise, ignoring the naysayers, always inquisitive and enjoying the game. And I think that’s how I think the game should be.&#xA;&#xA;pot odds&#xA;&#xA;People say poker is a game for the math-inclined, but the only equation you need is pot odds.&#xA;&#xA;Pot odds is risk/reward or b/(p+2b); this equation is really only applicable for rivers. For example, when villain bets a half pot sized bet, the pot odds is .25. If our call generates a win over a fourth of the time, then it’s printing. Sometimes, a villain will give us a great discrepancy between pot odds and how often we should be calling. These villains are called fish.&#xA;Much less useful than pot odds, but when constructing a bluff on a river with a range advantage, the theoretical bluff to value ratio should be b/(p+b). I mainly use this equation to keep me at bay from not over-bluffing. For example, a half-pot sized bet should have a bluff to value ratio of 1 to 3. Caveats: we need to have a range advantage, and this equation doesn’t account for villain having traps and raising. Consequences: this is ignoring exploit sizings … the greater the bet size, the greater the EV gained; however, even though theoretically a bigger bet will have more bluffs, when you actually have the nuts, villain is never calling your 3x shove on the river. (This video on trapping frequency is also a relevant watch.)&#xA;&#xA;preflop&#xA;&#xA;In a low stack-to-pot ratio situations, we want to have a hand like AQo or 77 for immediate showdown. In a high stack-to-pot ratio situations, we can consider hands like 89s or A7s to cooler/stack someone.&#xA;We should play more hands in position and less hands out of position. Ideally, in terms of where we sit, we want (1) aggressive players to the right of us so we can react and (2) passive players to the left of us so our aggression can go unchecked.&#xA;I just checked my preflop values for a site, my VPIP (voluntarily put in pot %) is 26 and my PFR (preflop raise %) is 18. I don’t think these numbers will deviate very much. A low VPIP/PFR is easier to play; the solver tells us a range advantage equals carte blanche to start blasting. You can consider playing even less hands due to rake; I looked at some solver outputs for 5-7x opens in casino rake environments, and there are situations when we should be folding even JJ and TT to a single early position raise.&#xA;Deviating preflop from optimal solver results is fine if you have a plan. For example, when people behind you only 3bet with premiums, it’s fine to just call in position. I also employ a light 3bet squeeze when there is a raise from a weak range and too many callers, specifically isolating a weak player.&#xA;&#xA;general&#xA;&#xA;There are some wizards of the game, but I think a general sense of how to play optimally is good enough.&#xA;&#xA;In general, tight aggressive is the correct style to play.&#xA;People at my stake tend to call with draws and raise with made hands.&#xA;Raises on the river are severely under-bluffed.&#xA;Under-bluffed population lines (4 to a flush, 4 to a straight, double paired boards, etc.) are good bluff lines.&#xA;Most EV is won by being in position of fish, usually a LAG type of player.&#xA;There are some BXB (bet flop, check turn, bet river) and BB lines that is going to be profitable against most population villains, especially on boards like dry paired boards (villain unlikely to connect) or blind vs blind (villain range too wide). However, I personally like to be villain specific when going for these red-line exploits.&#xA;Raises are going to generate more folds than bets. A small raise can be really effective against a weak polar range.&#xA;Bigger bets is an exploit against villains who over call.&#xA;Some players will respond to absolute sized bets more so than relative sized bets. E.g. A 300 dollar bet into a 600 dollar pot might be very big for someone. Sometimes on rivers, you might need to size down to get called.&#xA;I have a smaller sizing when I am trying to be raised or if villain is under-calling. I have a larger sizing to get called by lower equity hands or to generate folds.&#xA;More important than balance is knowing your image and knowing your opponent.&#xA;&#xA;multiway&#xA;&#xA;Many hands are played multi-way with nonstandard sizing.&#xA;&#xA;Use smaller bet sizing and bluff less in general multi-way. Against a half pot bet against 1 other player, we should call 66%. Against 5 players, we should call 20% of the time. Realistically, this number ought to be less. Half pot is big multi-way, but over-fold against even bigger bets.&#xA;If we have a very strong hand and the board is likely to be bet, we just want to check (to raise) to cooler someone. If it’s unlikely to be bet, we want to bet ourselves. If we have a good hand (but not a very strong hand), we can consider betting ourselves so we can react to a raise. In general, a lot of fishy villains telegraph hand strength from bet sizing or raises. You want to play a reactionary game against fishy players. Let them act, and then you get to react almost perfectly.&#xA;The person immediately calling a bet in a multi-way pot has a strong range. Given most situations, I usually just fold middle pair or worse.&#xA;Obviously, shift your range to be value heavy against villain who overcall. But since people over-fold to raises, it’s often good to check raise when we block a really strong hand on boards where villain is capped or doesn’t want to put more money in.&#xA;&#xA;Actual strategies are villain specific and more nuanced. But this should be a good start.&#xA;&#xA;live tells&#xA;&#xA;I have been getting better at live tells. Here are some examples:&#xA;&#xA;Villain reaching for chips defensively when you start to bet is weak.&#xA;A fishy player might say something regarding how weak they are. “I’m on a draw”, “I was afraid you’d snap call” are all signs of strength.&#xA;A player making a nervous move when they think you are not watching is much more indicative of weakness than if they act in an obvious manner. People know they are being watched after they make a big bet so you have to look for tells they can’t control (still palpitating after a few minutes might indicate a bluff, etc.).&#xA;Never believe what people have unless they show.&#xA;&#xA;other&#xA;&#xA;Be aware of collaboration. When two players always enter the pot together and there are suspicious betting patterns (to bully a third person out of pot or to maximize value of a player’s nutted hand to get multiple players to call). I think seeing showdown hands played in ways that don’t make sense can give you signs of collaboration.&#xA;Be aware of cheating; I put cheating in a different category from collaboration. I have been cheated twice in home games (once in Asia and once in NYC) due to some sort of dealer mechanics or marked cards. I don’t play in home games anymore.&#xA;PT4 is pretty good software to collect your hands. There are nice discord channels you can find to talk about hands.]]&gt;</description>
      <content:encoded><![CDATA[<p>Across playing low stakes live and microstakes online, I have won somewhere around 15k in profit playing poker.</p>

<p>I used to have a lengthier post full of EV calculation and theory. This is a much shorter post, more practical.</p>

<h3 id="should-i-be-playing" id="should-i-be-playing">should I be playing</h3>

<p>I recently came across describing poker tilt with Kahneman’s systems of thinking. The first system is automatic, fast, and emotional. The second system is deliberate, slow, and conscious. We use the first system when we are tilted. We abandon rational thoughts, becoming disillusioned gamblers.</p>

<p>I think about 10% of players are winners in the long run. In a small enough sample, anyone can be winning. Looking at this <a href="https://www.primedope.com/poker-variance-calculator/">variance calculator</a>, we’d need hundreds of thousands of hands to get an approximate win rate. And even then, a theoretically winning player could still be losing. Therefore, poker makes an excellent hobby but a poor source of income.</p>

<p>Lastly, money. How much money should I have to play? We can&#39;t make any bets if we don&#39;t have money. To calculate the <a href="https://www.investopedia.com/terms/r/risk-of-ruin.asp#:~:text=What%20Is%20Risk%20of%20Ruin,recover%20the%20losses%20or%20continue.">Risk of Ruin</a> of poker, I personally vouch for just taking a sample of your last n sessions, getting a mean/variance, and seeing how many standard deviations we are from the mean. We answer questions like “are these games too big for me?”. F(n) = e^(-2nm/v), v=variance, m=mean.</p>

<p>This is <a href="https://forumserver.twoplustwo.com/174/poker-blogs-goals/deeepz-moving-up-50nl-moving-out-2014-6max-1385616/">a thread</a> from Linus, one of the greatest cash game players of all time, before his ascent to greatness. To me, he just seems indomitable even during his rise, ignoring the naysayers, always inquisitive and enjoying the game. And I think that’s how I think the game should be.</p>

<h3 id="pot-odds" id="pot-odds">pot odds</h3>

<p>People say poker is a game for the math-inclined, but the only equation you need is pot odds.</p>
<ul><li>Pot odds is risk/reward or b/(p+2b); this equation is really only applicable for rivers. For example, when villain bets a half pot sized bet, the pot odds is .25. If our call generates a win over a fourth of the time, then it’s printing. Sometimes, a villain will give us a great discrepancy between pot odds and how often we should be calling. These villains are called fish.</li>
<li>Much less useful than pot odds, but when constructing a bluff on a river with a range advantage, the theoretical bluff to value ratio should be b/(p+b). I mainly use this equation to keep me at bay from not over-bluffing. For example, a half-pot sized bet should have a bluff to value ratio of 1 to 3. Caveats: we need to have a range advantage, and this equation doesn’t account for villain having traps and raising. Consequences: this is ignoring exploit sizings … the greater the bet size, the greater the EV gained; however, even though theoretically a bigger bet will have more bluffs, when you actually have the nuts, villain is never calling your 3x shove on the river. (This <a href="https://www.youtube.com/watch?v=w_N-zaMbDok">video </a>on trapping frequency is also a relevant watch.)</li></ul>

<p><strong>preflop</strong></p>
<ul><li>In a low stack-to-pot ratio situations, we want to have a hand like AQo or 77 for immediate showdown. In a high stack-to-pot ratio situations, we can consider hands like 89s or A7s to cooler/stack someone.</li>
<li>We should play more hands in position and less hands out of position. Ideally, in terms of where we sit, we want (1) aggressive players to the right of us so we can react and (2) passive players to the left of us so our aggression can go unchecked.</li>
<li>I just checked my preflop values for a site, my VPIP (voluntarily put in pot %) is 26 and my PFR (preflop raise %) is 18. I don’t think these numbers will deviate very much. A low VPIP/PFR is easier to play; the solver tells us a range advantage equals carte blanche to start blasting. You can consider playing even less hands due to rake; I looked at some solver outputs for 5-7x opens in casino rake environments, and there are situations when we should be folding even JJ and TT to a single early position raise.</li>
<li>Deviating preflop from optimal solver results is fine if you have a plan. For example, when people behind you only 3bet with premiums, it’s fine to just call in position. I also employ a light 3bet squeeze when there is a raise from a weak range and too many callers, specifically isolating a weak player.</li></ul>

<p><strong>general</strong></p>

<p>There are some wizards of the game, but I think a general sense of how to play optimally is good enough.</p>
<ul><li>In general, tight aggressive is the correct style to play.</li>
<li>People at my stake tend to call with draws and raise with made hands.</li>
<li>Raises on the river are severely under-bluffed.</li>
<li>Under-bluffed population lines (4 to a flush, 4 to a straight, double paired boards, etc.) are good bluff lines.</li>
<li>Most EV is won by being in position of fish, usually a LAG type of player.</li>
<li>There are some BXB (bet flop, check turn, bet river) and BB lines that is going to be profitable against most population villains, especially on boards like dry paired boards (villain unlikely to connect) or blind vs blind (villain range too wide). However, I personally like to be villain specific when going for these red-line exploits.</li>
<li>Raises are going to generate more folds than bets. A small raise can be really effective against a weak polar range.</li>
<li>Bigger bets is an exploit against villains who over call.</li>
<li>Some players will respond to absolute sized bets more so than relative sized bets. E.g. A 300 dollar bet into a 600 dollar pot might be very big for someone. Sometimes on rivers, you might need to size down to get called.</li>
<li>I have a smaller sizing when I am trying to be raised or if villain is under-calling. I have a larger sizing to get called by lower equity hands or to generate folds.</li>
<li>More important than balance is knowing your image and knowing your opponent.</li></ul>

<p><strong>multiway</strong></p>

<p>Many hands are played multi-way with nonstandard sizing.</p>
<ul><li>Use smaller bet sizing and bluff less in general multi-way. Against a half pot bet against 1 other player, we should call 66%. Against 5 players, we should call 20% of the time. Realistically, this number ought to be less. Half pot is big multi-way, but over-fold against even bigger bets.</li>
<li>If we have a very strong hand and the board is likely to be bet, we just want to check (to raise) to cooler someone. If it’s unlikely to be bet, we want to bet ourselves. If we have a good hand (but not a very strong hand), we can consider betting ourselves so we can react to a raise. In general, a lot of fishy villains telegraph hand strength from bet sizing or raises. You want to play a reactionary game against fishy players. Let them act, and then you get to react almost perfectly.</li>
<li>The person immediately calling a bet in a multi-way pot has a strong range. Given most situations, I usually just fold middle pair or worse.</li>
<li>Obviously, shift your range to be value heavy against villain who overcall. But since people over-fold to raises, it’s often good to check raise when we block a really strong hand on boards where villain is capped or doesn’t want to put more money in.</li></ul>

<p>Actual strategies are villain specific and more nuanced. But this should be a good start.</p>

<p><strong>live tells</strong></p>

<p>I have been getting better at live tells. Here are some examples:</p>
<ul><li>Villain reaching for chips defensively when you start to bet is weak.</li>
<li>A fishy player might say something regarding how weak they are. “I’m on a draw”, “I was afraid you’d snap call” are all signs of strength.</li>
<li>A player making a nervous move when they think you are not watching is much more indicative of weakness than if they act in an obvious manner. People know they are being watched after they make a big bet so you have to look for tells they can’t control (still palpitating after a few minutes might indicate a bluff, etc.).</li>
<li>Never believe what people have unless they show.</li></ul>

<p><strong>other</strong></p>
<ul><li>Be aware of collaboration. When two players always enter the pot together and there are suspicious betting patterns (to bully a third person out of pot or to maximize value of a player’s nutted hand to get multiple players to call). I think seeing showdown hands played in ways that don’t make sense can give you signs of collaboration.</li>
<li>Be aware of cheating; I put cheating in a different category from collaboration. I have been cheated twice in home games (once in Asia and once in NYC) due to some sort of dealer mechanics or marked cards. I don’t play in home games anymore.</li>
<li>PT4 is pretty good software to collect your hands. There are nice discord channels you can find to talk about hands.</li></ul>
]]></content:encoded>
      <guid>https://cache.bwang.io/practical-poker</guid>
      <pubDate>Fri, 14 Nov 2025 18:43:34 +0000</pubDate>
    </item>
    <item>
      <title>ecom experiments</title>
      <link>https://cache.bwang.io/ecom-experiments?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[E-commerce is growing exponentially. I frequently see overnight successes of such companies through viral marketing; globalization and software have made it trivial for someone to open a store and saturate a product.&#xA;&#xA;I spent about 1000 USD with 300 annual recurring costs (which I eventually stopped) selling on Shopify with ads on Facebook Ads, earning about 200 annually in revenue. I also had some other experiments with trying to move bulk on Amazon and trying to set up some ads on Tiktok. I lost money, and I consider this as just education fees.&#xA;&#xA;I have another product on an unmentioned platform, with about 1000-3000 in annual revenue, netting half of that as profit (this online store is ongoing).&#xA;&#xA;Here are some things learned:&#xA;&#xA;All businesses are just trying to answer one question: “How do I get someone to give me money?” I’m very logical, so I have always thought the answer to that question was the exchange of utility. However, I have learned that in markets where there is a general surplus, the choices we make are often emotional.&#xA;Everything we buy is a choice, and almost everything we buy is due to interruption marketing. Large aggregators of data make extremely accurate guesses on what we might like, and money is spent so we make decisions we might not otherwise have made.&#xA;A good market fit means you’ll pay less to get someone to buy something. A good brand or story means you can get someone to pay more to buy something.&#xA;&#xA;It was kind of costly to run these experiments but it’s educational to see the systems that sellers use. What surprised me the most in all of this was that a disproportionate amount of money is spent on acquisition (and not on the actual product). A pair of shoes can cost $100 on a shelf but can only cost $10 to make. With future advances in automation, AI content, and consumer data collection, it can cost even less.]]&gt;</description>
      <content:encoded><![CDATA[<p>E-commerce is growing exponentially. I frequently see overnight successes of such companies through viral marketing; globalization and software have made it trivial for someone to open a store and saturate a product.</p>

<p>I spent about 1000 USD with 300 annual recurring costs (which I eventually stopped) selling on Shopify with ads on Facebook Ads, earning about 200 annually in revenue. I also had some other experiments with trying to move bulk on Amazon and trying to set up some ads on Tiktok. I lost money, and I consider this as just education fees.</p>

<p>I have another product on an unmentioned platform, with about 1000-3000 in annual revenue, netting half of that as profit (this online store is ongoing).</p>

<p>Here are some things learned:</p>
<ul><li>All businesses are just trying to answer one question: “How do I get someone to give me money?” I’m very logical, so I have always thought the answer to that question was the exchange of utility. However, I have learned that in markets where there is a general surplus, the choices we make are often emotional.</li>
<li>Everything we buy is a choice, and almost everything we buy is due to interruption marketing. Large aggregators of data make extremely accurate guesses on what we might like, and money is spent so we make decisions we might not otherwise have made.</li>
<li>A good market fit means you’ll pay less to get someone to buy something. A good brand or story means you can get someone to pay more to buy something.</li></ul>

<p>It was kind of costly to run these experiments but it’s educational to see the systems that sellers use. What surprised me the most in all of this was that a disproportionate amount of money is spent on acquisition (and not on the actual product). A pair of shoes can cost $100 on a shelf but can only cost $10 to make. With future advances in automation, AI content, and consumer data collection, it can cost even less.</p>
]]></content:encoded>
      <guid>https://cache.bwang.io/ecom-experiments</guid>
      <pubDate>Wed, 15 Jan 2025 22:36:25 +0000</pubDate>
    </item>
    <item>
      <title>why crypto</title>
      <link>https://cache.bwang.io/why-crypto?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[I’ve been getting some FOMO and mixed thoughts on BTC. This is just a quick rundown to help me think through whether I should invest.&#xA;&#xA;The weakening fiat&#xA;&#xA;The argument I see the most often for crypto is that it’s a hedge (reserve asset) against a diluted fiat currency.&#xA;&#xA;The US is using an increasing proportion of capital to service debt year over year. We are not in a recession yet (debt:gdp - note 2008 and 2020), which means that the US could potentially increase the money supply even more. In the short term, increasing money supply increases liquidity and assets increase. However, in the longer horizon, historically, when inflation is high, people like to buy supply-limited value stores like precious metals or real estate.&#xA;&#xA;Money will flow from the stock market and into these government securities to serve the increasing debt; for example, t-bills and interest rate regulation. As the US spends more and more money in foreign affairs and military to preserve its status as a leading superpower (e.g. billions of dollar for Ukraine.), it could be reminiscent of a downfall similar to that of the Dutch in the 1720s or the UK in the 20th century. (1)&#xA;&#xA;Is crypto a reserve asset? I don’t think so yet. Within a few years, there will be overall inflation and circumstantial defaults/liquidity risks. I think it unlikely that crypto will be a hedge against inflation (like gold) in the current cycle, as people will sell crypto in times of less liquidity. Crypto peaked at Dec 2007 (great recession), dropping around from 20k to 3k. I think we are in a similar point in the cycle.&#xA;&#xA;Instability and exodus&#xA;&#xA;The global narrative of crypto is strengthened by globalization and pessimism. The wealthy will seek less tax and safety, while the less affluent seek freedom and reduced income inequality. In recent history, crypto has been on the forefront of many monetary exoduses due to national pressures. For reasons mentioned above (more investment into T-bills and less into the stock market, higher taxes, etc.), companies may also want to move outside of the US to seek more benefits.&#xA;&#xA;Will there be a lot of struggles with the nation-state in the future? Maybe (1) (2). Maybe not. Hopefully it won’t be violent, as there is a general surplus. Moreover, great social inequality already exists in the modern era without violent revolutions.&#xA;&#xA;What about nations? Historically speaking, changes in the global order results in war; if this is no exception, what would happen to the value of crypto in the wake of fallen nations?&#xA;&#xA;A risky investment&#xA;&#xA;I see a lot of staunch advocates on Twitter and Reddit saying that it’s risky to not hold crypto, that fiat money will be worthless in the future. After reading many articles and news on crypto, buying some on an exchange, and looking into some crypto projects, I still think that it’s a risky investment.&#xA;&#xA;On the consumer level, it’s risky because your access to it involves you remembering a secret recovery. Most entities like BlackRock and Fidelity just offer it through an ETF, which I think is a substandard way of owning the asset. Not only is there a 1.5% fee, it’s not FDIC insured and you don’t get rights to the underlying asset.&#xA;&#xA;It’s also risky because of  the prevalence of “dumb money”. The FTX exchange defaulted as a result of holding illiquid (like Silicon Valley bank) and fraud and volatile assets. Also, the Luna Terra fraud incident. Right now, the price of Solana is really high as a result of rug-pull NFT schemes. I was unaware of the extent of scams related to crypto until I conducted my research.&#xA;&#xA;It’s risky for the nation-state as well. There is so much regulation on crypto, with countries like China, Bangladesh, Qatar, Morocco, etc. banning crypto. Even many countries that have not banned crypto hold oppressive laws, maybe under, I think, the guise of preventing money laundering.&#xA;&#xA;The adoption of crypto&#xA;&#xA;I think many countries hold public and private positions on crypto. For example, the government of Bhutan has been secretly mining BTC; if a small country like Bhutan has been mining BTC privately, and if you look at the current very high hash-rate and NVIDIA stock prices, you can only imagine the amount of mining done by larger countries.&#xA;&#xA;In September 2023, 29% of all people in India had crypto, 18% of HK, and 13% of Americans, growing at around 34% year over year. The number of active / new addresses are increasing as well. I think this gives teeth to the idea that shutting it down in a country does not kill the narrative.&#xA;&#xA;Tiny data exploration&#xA;&#xA;I downloaded the entire blockchain of an altcoin and did some pool mining.&#xA;&#xA;I also did some really rough multiple linear regression just to get a general idea on what determines or is well-correlated with BTC price. I created a tiny dataset consisting of a bunch of factors in the first half of 2022. I had some prices of securities, some momentum indicators, FRED economic data that includes GDP, liquidity, some free sentiment data, google trends data, general blockchain data like hash-rates, etc. In my data, I found that Coinbase stock price and google trends for the phrase ‘crypto’ are the best features to determine (or are strongly correlated by) BTC price.&#xA;&#xA;I’ll look at some other things in the future to get my feet wetter.&#xA;&#xA;I also moved a small amount of BTC to a cold storage, more so just going through the motions to see what’s it like.&#xA;&#xA;Conclusion&#xA;&#xA;Even though I don’t think BTC is the reserve asset people hype it up to be, I am bullish on the idea. The price will fluctuate as people sell and buy in different market conditions. Crypto sentiment and macroeconomic conditions will likely be the most significant factors influencing price. And staying informed is prudent.]]&gt;</description>
      <content:encoded><![CDATA[<p>I’ve been getting some FOMO and mixed thoughts on BTC. This is just a quick rundown to help me think through whether I should invest.</p>

<h3 id="the-weakening-fiat" id="the-weakening-fiat">The weakening fiat</h3>

<p>The argument I see the most often for crypto is that it’s a hedge (<a href="https://www.reddit.com/r/Bitcoin/comments/1btnvo2/comment/kxndn8n/?utm_source=share&amp;utm_medium=web2x&amp;context=3">reserve asset</a>) against a diluted fiat currency.</p>

<p>The US is using an increasing proportion of capital to service debt year over year. We are not in a recession yet (<a href="https://fred.stlouisfed.org/series/GFDEGDQ188S">debt:gdp</a> – note 2008 and 2020), which means that the US could potentially increase the money supply even more. In the short term, increasing money supply increases liquidity and assets increase. However, in the longer horizon, historically, when inflation is high, people like to buy supply-limited value stores like precious metals or real estate.</p>

<p>Money will flow from the stock market and into these government securities to serve the increasing <a href="https://fred.stlouisfed.org/series/A091RC1Q027SBEA">debt</a>; for example, <a href="https://www.investopedia.com/terms/t/treasurybill.asp">t-bills</a> and <a href="https://www.newyorkfed.org/markets/desk-operations/reverse-repo">interest rate regulation</a>. As the US spends more and more money in foreign affairs and military to preserve its status as a leading superpower (e.g. billions of dollar for Ukraine.), it could be reminiscent of a downfall similar to that of the Dutch in the 1720s or the UK in the 20th century. (<a href="https://www.amazon.com/Changing-World-Order-Nations-Succeed/dp/1982160276">1</a>)</p>

<p>Is crypto a reserve asset? I don’t think so yet. Within a few years, there will be overall inflation and circumstantial defaults/liquidity risks. I think it unlikely that crypto will be a hedge against inflation (like gold) in the current cycle, as people will sell crypto in times of less liquidity. Crypto peaked at Dec 2007 (great recession), dropping around from 20k to 3k. I think we are in a similar point in the cycle.</p>

<h3 id="instability-and-exodus" id="instability-and-exodus">Instability and exodus</h3>

<p>The global narrative of crypto is strengthened by globalization and pessimism. The wealthy will seek less tax and <a href="https://www.hollywoodreporter.com/lifestyle/lifestyle-news/bunkers-billionaires-survive-apocalypse-cost-features-1235822762/">safety</a>, while the less affluent seek freedom and reduced income inequality. In recent history, crypto has been on the forefront of many <a href="https://www.weforum.org/agenda/2023/03/the-role-cryptocurrency-crypto-huge-in-ukraine-war-russia/">monetary exoduses</a> due to national <a href="https://www.forbes.com/sites/rogerhuang/2019/08/11/as-protests-in-hong-kong-surge-so-does-demand-for-cryptocurrency/?sh=49e465e675f6">pressures</a>. For reasons mentioned above (more investment into T-bills and less into the stock market, higher taxes, etc.), companies may also want to move <a href="https://qz.com/elon-musk-world-government-summit-2023-dubai-speaking-1850098289">outside</a> of the US to seek more <a href="https://www.aljazeera.com/news/2023/11/28/elon-musks-israel-trip-what-was-the-purpose-what-did-he-tell-netanyahu">benefits</a>.</p>

<p>Will there be a lot of struggles with the nation-state in the future? Maybe (<a href="https://news.stanford.edu/2017/01/24/stanford-historian-uncovers-grim-correlation-violence-inequality-millennia/">1</a>) (<a href="https://ourworldindata.org/the-history-of-global-economic-inequality">2</a>). Maybe not. Hopefully it won’t be violent, as there is a general surplus. Moreover, great social inequality already exists in the modern era without violent revolutions.</p>

<p>What about nations? Historically speaking, changes in the global order results in war; if this is no <a href="https://thebulletin.org/doomsday-clock/">exception</a>, what would happen to the value of crypto in the wake of <a href="https://www.cnn.com/2024/03/09/politics/us-prepared-rigorously-potential-russian-nuclear-strike-ukraine/index.html">fallen nations</a>?</p>

<h3 id="a-risky-investment" id="a-risky-investment">A risky investment</h3>

<p>I see a lot of staunch advocates on Twitter and <a href="https://www.reddit.com/r/CryptoCurrency/">Reddit</a> saying that it’s risky to not hold crypto, that fiat money will be worthless in the future. After reading many articles and news on crypto, buying some on an exchange, and looking into some crypto projects, I still think that it’s a risky investment.</p>

<p>On the consumer level, it’s risky because your access to it involves you remembering a secret recovery. Most entities like BlackRock and Fidelity just offer it through an <a href="https://etfs.grayscale.com/gbtc">ETF</a>, which I think is a substandard way of owning the asset. Not only is there a 1.5% fee, it’s not <a href="https://consumer.ftc.gov/consumer-alerts/2023/10/crypto-companies-touting-fdic-insurance-not-so-fast">FDIC</a> insured and you don’t get rights to the underlying asset.</p>

<p>It’s also risky because of  the prevalence of “dumb money”. The <a href="https://www.investopedia.com/what-went-wrong-with-ftx-6828447#:~:text=FTX%20collapsed%20in%20early%20November,value%20from%20speculative%20cryptocurrency%20tokens.">FTX</a> exchange defaulted as a result of holding illiquid (like <a href="https://en.wikipedia.org/wiki/Collapse_of_Silicon_Valley_Bank#:~:text=On%20March%2010%2C%202023%2C%20Silicon,the%202007%E2%80%932008%20financial%20crisis.">Silicon Valley</a> bank) and fraud and volatile assets. Also, the <a href="https://www.forbes.com/sites/siladityaray/2023/03/24/terra-luna-coins-founder-do-kwon-charged-with-fraud-by-us-prosecutors/">Luna Terra</a> fraud incident. Right now, the price of Solana is really high as a result of rug-pull NFT schemes. I was unaware of the extent of <a href="https://consumer.ftc.gov/articles/what-know-about-cryptocurrency-and-scams">scams</a> related to crypto until I conducted my research.</p>

<p>It’s risky for the nation-state as well. There is so <a href="https://en.wikipedia.org/wiki/Cryptocurrency#Increasing_regulation">much regulation</a> on crypto, with <a href="https://www.investopedia.com/articles/forex/041515/countries-where-bitcoin-legal-illegal.asp">countries</a> like China, Bangladesh, Qatar, Morocco, etc. banning crypto. Even many countries that have not banned crypto hold <a href="https://www.investopedia.com/terms/b/bank_secrecy_act.asp">oppressive</a> laws, maybe under, I think, the guise of <a href="https://www.google.com/url?q=https://cointelegraph.com/news/eu-enacts-ban-on-anonymous-crypto-transactions-via-self-custody-wallets&amp;sa=D&amp;source=docs&amp;ust=1712088691402191&amp;usg=AOvVaw29zamuEEqvfUH4NwnVoCXN">preventing</a> money <a href="https://amp.dw.com/en/eu-seeks-cash-payment-limit-tougher-money-laundering-rules/a-68024075">laundering</a>.</p>

<h3 id="the-adoption-of-crypto" id="the-adoption-of-crypto">The adoption of crypto</h3>

<p>I think many countries hold public and private positions on crypto. For example, the government of Bhutan has been <a href="https://www.forbes.com/sites/iainmartin/2023/11/22/bhutan-secret-bitcoin-mine-locations/">secretly mining BTC</a>; if a small country like Bhutan has been mining BTC privately, and if you look at the current very high <a href="https://www.blockchain.com/explorer/charts/hash-rate">hash-rate</a> and NVIDIA stock prices, you can only imagine the amount of mining done by larger countries.</p>

<p>In September 2023, 29% of all people in India had crypto, 18% of HK, and 1<a href="https://buybitcoinworldwide.com/crypto-adoption-index-statistics/">3% of Americans</a>, growing at around <a href="https://news.bitcoin.com/number-of-crypto-owners-globally-reached-580-million-in-2023-report-shows/">34% year over year</a>. The number of <a href="https://studio.glassnode.com/metrics?a=BTC&amp;m=addresses.ActiveCount">active</a> / <a href="=">new</a> addresses are increasing as well. I think this gives teeth to the idea that shutting it down in a country does not kill the narrative.</p>

<h3 id="tiny-data-exploration" id="tiny-data-exploration">Tiny data exploration</h3>

<p>I downloaded the entire blockchain of an altcoin and did some <a href="https://www.investopedia.com/terms/m/mining-pool.asp">pool mining</a>.</p>

<p>I also did some really rough multiple linear regression just to get a general idea on what determines or is well-correlated with BTC price. I created a tiny dataset consisting of a bunch of factors in the first half of 2022. I had some prices of securities, some momentum indicators, <a href="https://fred.stlouisfed.org/">FRED</a> economic data that includes GDP, <a href="https://www.tradingview.com/script/OBJPsNq1-Fed-Net-Liquidity-Indicator/">liquidity</a>, some free sentiment data, google trends data, general blockchain data like hash-rates, etc. In my data, I found that <a href="https://finance.yahoo.com/quote/COIN/">Coinbase stock price</a> and google trends for the phrase ‘<a href="https://trends.google.com/trends/explore?date=2015-01-01%202024-03-28&amp;geo=US&amp;q=crypto&amp;hl=en">crypto</a>’ are the best features to determine (or are strongly correlated by) BTC price.</p>

<p>I’ll look at some other things in the future to get my feet wetter.</p>

<p>I also moved a small amount of BTC to a <a href="https://www.investopedia.com/terms/c/cold-storage.asp">cold storage</a>, more so just going through the motions to see what’s it like.</p>

<h3 id="conclusion" id="conclusion">Conclusion</h3>

<p>Even though I don’t think BTC is the reserve asset people hype it up to be, I am bullish on the idea. The price will fluctuate as people sell and buy in different market conditions. Crypto sentiment and macroeconomic conditions will likely be the most significant factors influencing price. And staying informed is prudent.</p>
]]></content:encoded>
      <guid>https://cache.bwang.io/why-crypto</guid>
      <pubDate>Wed, 03 Apr 2024 19:46:22 +0000</pubDate>
    </item>
    <item>
      <title>growing peppers</title>
      <link>https://cache.bwang.io/growing-peppers?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[&#xA;&#xA;I just wanted to grow something.&#xA;&#xA;Peppers are pretty cool; they are pretty easy to grow, they self-pollinate, requires little space, are productive, and takes about 3 or 4 months from seedling to fruit.&#xA;&#xA;I enjoy spicy food, and so I also plan on making some hot sauce and pickled peppers.&#xA;&#xA;Things learned:&#xA;&#xA;Even though I live in excellent pepper-growing climate, cold 50 degree nights contributed to stunted growth.&#xA;Broad mite infestation needs to be taken care of immediately. A month before fruiting, I discovered some curls on the leaves on my pepper plants. Broad mites are terrible because they suck the sap out of your leaves and are pretty much invisible. This product: \[flying skull nuke-em\] is only somewhat useful. &#xA;Some people recommend that you should water mature plants twice a week, but I should have only watered once a week. Over-watering plus the overall lack of indoor air-circulation results in plant edema.&#xA;I probably also didn’t need to go so deep into growing peppers. I consumed tens if not hundreds of hours of pepper content. There are videos on variables affecting germination rates, fertilizers, etc. However, in the end, it really doesn&#39;t matter that much as mother nature will take care most of it.&#xA;&#xA;varieties&#xA;&#xA;Some varieties I grew: Jalapeno, Cayenne, Jimmy Nardeloo, Tabasco, Black Pearl, Cayenetta, Santaka, Fish, Jigsaw.&#xA;&#xA;I ended up sharing a lot of my seedlings to friends.&#xA;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p><img src="https://i.snap.as/XyzdjGCq.png" alt=""/></p>

<p>I just wanted to grow something.</p>

<p>Peppers are pretty cool; they are pretty easy to grow, they self-pollinate, requires little space, are productive, and takes about 3 or 4 months from seedling to fruit.</p>

<p>I enjoy spicy food, and so I also plan on making some hot sauce and pickled peppers.</p>

<p>Things learned:</p>
<ul><li>Even though I live in excellent pepper-growing climate, cold 50 degree nights contributed to stunted growth.</li>
<li>Broad mite infestation needs to be taken care of immediately. A month before fruiting, I discovered some curls on the leaves on my pepper plants. Broad mites are terrible because they suck the sap out of your leaves and are pretty much invisible. This product: [<a href="https://www.flyingskull.net/flying-skull-nuke-em-8-oz.html">flying skull nuke-em</a>] is only somewhat useful.</li>
<li>Some people recommend that you should water mature plants twice a week, but I should have only watered once a week. Over-watering plus the overall lack of indoor air-circulation results in plant edema.</li>
<li>I probably also didn’t need to go so deep into growing peppers. I consumed tens if not hundreds of hours of pepper content. There are videos on variables affecting germination rates, fertilizers, etc. However, in the end, it really doesn&#39;t matter that much as mother nature will take care most of it.</li></ul>

<h4 id="varieties" id="varieties">varieties</h4>

<p>Some varieties I grew: Jalapeno, Cayenne, Jimmy Nardeloo, Tabasco, Black Pearl, Cayenetta, Santaka, Fish, Jigsaw.</p>

<p>I ended up sharing a lot of my seedlings to friends.</p>

<p><img src="https://i.snap.as/bgVIDufr.png" alt=""/></p>

<p><img src="https://i.snap.as/p6jiYmeC.png" alt=""/></p>
]]></content:encoded>
      <guid>https://cache.bwang.io/growing-peppers</guid>
      <pubDate>Fri, 19 Jan 2024 02:36:41 +0000</pubDate>
    </item>
    <item>
      <title>book reviews</title>
      <link>https://cache.bwang.io/book-reviews?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[Here are some quick takeaways of some books I read this year.&#xA;&#xA;Million Dollar Weekend – Noah Hagan&#xA;&#xA;Nice lessons: Always ask for what you want. Quantity   Quality. Visualize. A nice book to be put into a productive gear.&#xA;&#xA;Sapiens – Yuval Noah Harari&#xA;&#xA;Sample theses: Physical communities are being replaced by virtual communities. Natural religions (nationalism, capitalism, moral frameworks, etc.) are replacing traditional deities. Real peace is the implausibility of war.&#xA;In the last chapter, Harari describes Sapiens as god-like, but also perpetually dissatisfied and irresponsible. It’s less of a history textbook and more of a book using history to justify commentary on human behavior.&#xA;&#xA;Zero to One - Peter Theil&#xA;&#xA;This is a book for the contrarian. What important truth do very few people agree with you on? Some main ideas are (1) Competition is bad. (2) Start small and don’t disrupt. (3) The power law - hedge in winners.&#xA;I have reread this book once every few years. I can think about recent changes (AI, tech companies, competition, etc.) within the context of some simple ideas provided by this book.&#xA;&#xA;The Best American Essays 2023 – Vivian Gornick&#xA;&#xA;This is basically an anthology of eclectic voices (e.g. a doctor treating an unusually unstable drug addict, a young adult in maximum security prison turned writer due to solitude, a girl finding out her mom is gay at the very end of her mom’s life through old photos, etc.)]]&gt;</description>
      <content:encoded><![CDATA[<p>Here are some quick takeaways of some books I read this year.</p>

<p>Million Dollar Weekend – Noah Hagan</p>
<ul><li>Nice lessons: Always ask for what you want. Quantity &gt; Quality. Visualize. A nice book to be put into a productive gear.</li></ul>

<p>Sapiens – Yuval Noah Harari</p>
<ul><li>Sample theses: Physical communities are being replaced by virtual communities. Natural religions (nationalism, capitalism, moral frameworks, etc.) are replacing traditional deities. Real peace is the implausibility of war.</li>
<li>In the last chapter, Harari describes Sapiens as god-like, but also perpetually dissatisfied and irresponsible. It’s less of a history textbook and more of a book using history to justify commentary on human behavior.</li></ul>

<p>Zero to One – Peter Theil</p>
<ul><li>This is a book for the contrarian. What important truth do very few people agree with you on? Some main ideas are (1) Competition is bad. (2) Start small and don’t disrupt. (3) The power law – hedge in winners.</li>
<li>I have reread this book once every few years. I can think about recent changes (AI, tech companies, competition, etc.) within the context of some simple ideas provided by this book.</li></ul>

<p>The Best American Essays 2023 – Vivian Gornick</p>
<ul><li>This is basically an anthology of eclectic voices (e.g. a doctor treating an unusually unstable drug addict, a young adult in maximum security prison turned writer due to solitude, a girl finding out her mom is gay at the very end of her mom’s life through old photos, etc.)</li></ul>
]]></content:encoded>
      <guid>https://cache.bwang.io/book-reviews</guid>
      <pubDate>Mon, 04 Dec 2023 20:29:41 +0000</pubDate>
    </item>
    <item>
      <title>dumb poker</title>
      <link>https://cache.bwang.io/wasted-time?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[I made a tool to use to save hands and give a strategy on how to play different hands. This project will no longer exists.&#xA;&#xA;Demo: https://www.youtube.com/watch?v=yzJxsdWZHnQ&#xA;&#xA;The first deployment of this was over on GCP. I redid it on Heroku. I used cookiecutter django for easy setup, with mailgun/maildev, sentry, postgres, redis (managed by heroku).&#xA;&#xA;I bought a domain (dysk.app).&#xA;&#xA;I gave up working on this project because as I learned more about poker, the less I thought what I was working on made sense. I wanted to create an app that saves key poker hands, and would theoretically help me play hands like a flow chart.&#xA;&#xA;There are also excellent existing free-tier apps that does what my app set out or can pivot to. Why create a lesser version of something that&#39;s already so good available free?&#xA;&#xA;GTO Wizard (free) 100bb pre-flop charts and simple solutions.&#xA;PokerTraker (paid) for poker hand bookkeeper and statistics&#xA;Poker Bankroll Tracker (free) to record key hands, do bankroll management&#xA;WASM postflop (free) GTO solver&#xA;Some MDA apps I think the author doesn’t want me sharing. Some MDA stuff I was parsing myself. (Parse over 1M hands to see where we can exploit).]]&gt;</description>
      <content:encoded><![CDATA[<p>I made a tool to use to save hands and give a strategy on how to play different hands. This project will no longer exists.</p>

<p>Demo: <iframe allow="monetization" class="embedly-embed" src="//cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FyzJxsdWZHnQ%3Ffeature%3Doembed&display_name=YouTube&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DyzJxsdWZHnQ&image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FyzJxsdWZHnQ%2Fhqdefault.jpg&type=text%2Fhtml&schema=youtube" width="640" height="360" scrolling="no" title="YouTube embed" frameborder="0" allow="autoplay; fullscreen; encrypted-media; picture-in-picture;" allowfullscreen="true"></iframe></p>

<p>The first deployment of this was over on GCP. I redid it on Heroku. I used <a href="https://github.com/cookiecutter/cookiecutter-django">cookiecutter django</a> for easy setup, with mailgun/maildev, sentry, postgres, redis (managed by heroku).</p>

<p>I bought a domain (dysk.app).</p>

<p>I gave up working on this project because as I learned more about poker, the less I thought what I was working on made sense. I wanted to create an app that saves key poker hands, and would theoretically help me play hands like a flow chart.</p>

<p>There are also excellent existing free-tier apps that does what my app set out or can pivot to. Why create a lesser version of something that&#39;s already so good available free?</p>
<ul><li><a href="https://app.gtowizard.com/">GTO Wizard</a> (free) 100bb pre-flop charts and simple solutions.</li>
<li><a href="https://www.pokertracker.com/">PokerTraker</a> (paid) for poker hand bookkeeper and statistics</li>
<li><a href="https://pokerbankrolltracker.net/">Poker Bankroll Tracker</a> (free) to record key hands, do bankroll management</li>
<li><a href="https://github.com/b-inary/desktop-postflop">WASM postflop</a> (free) GTO solver</li>
<li>Some MDA apps I think the author doesn’t want me sharing. Some MDA stuff I was parsing myself. (Parse over 1M hands to see where we can exploit).</li></ul>
]]></content:encoded>
      <guid>https://cache.bwang.io/wasted-time</guid>
      <pubDate>Tue, 10 Jan 2023 02:53:42 +0000</pubDate>
    </item>
    <item>
      <title>trading automation</title>
      <link>https://cache.bwang.io/trading-automation?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[I spent 90% of my time doing stuff that I ended up scrapping.&#xA;&#xA;Products like Zapier are restrictive (no external libs, at least at the time of writing this) and also very expensive; the cost is on another order of magnitude.&#xA;&#xA;I also could have set up automation with mac crons. However this is a hard restriction as my machine can&#39;t be shut down or sleeping.&#xA;&#xA;There are out-of-the-box solutions like AI Platform Notebooks or Colab for writing and running code with live machines. Google also offers other managed products like Cloud Composer, not to mention the plethora of other non-Google solutions out there. These are great, I even tried a few of these out, but for one reason or the other (wrong use case, too many bells and whistles, expensive, restrictive, etc.), I decided to play with other toys.&#xA;&#xA;I almost went with Papermill as writing code in Jupyter is easy and fast. Papermill gives .ipynb files a level of productionization by allowing parameterization and execution. You can run something like papermill gs://bucket-name/input.ipynb gs://bucket-name/output.ipynb -f parameters.yaml to run and store (integrations include Google Cloud Storage).&#xA;&#xA;There&#39;s are also best practices that go with productionizing Jupyter (testbook for tests, nbdime for diffs, etc.). Jupyter is super easy to write in, and it supports many different programming languages. This is essentially the process that Netflix and Bilibili use (+ this talk and this post).&#xA;&#xA;The tradeoffs for using Jupyter are speed, size (install notebook/kernel, papermill, apis), and money (VMs can be expensive). I created an MVP for this (pubsub -  papermill).&#xA;&#xA;In the end, the stuff that was productionized was just a rust API, a tiny CLI tool in rust with reqwest and clap that is basically a wrapper around another library.&#xA;&#xA;fn buyasps(reqs: Endpoint) {&#xA;   let getrequest = reqs.postrequest(&#34;/orders&#34;, body);&#xA;}&#xA;&#xA;When we get an event from PubSub, we trigger this business logic with a command like cargo run -- --date 20210517 --function account --islive. There is enough flexibility to run different functions on different dates, using a live account or a paper account, and even more, depending on the PubSub signal. The signal is created by Cloud Scheduler, which is basically a cron. All of this is controlled in GCP&#39;s UI. The binary gets run by Cloud Functions.&#xA;&#xA;Disclosure: this is no longer running.&#xA;&#xA;This project costs less than a 30 cents a year. Note that all software is glorified automation, and there are other great options for other use cases.]]&gt;</description>
      <content:encoded><![CDATA[<p>I spent 90% of my time doing stuff that I ended up scrapping.</p>

<p>Products like Zapier are restrictive (no external libs, at least at the time of writing this) and also very expensive; the cost is on another order of magnitude.</p>

<p>I also could have set up automation with <a href="https://ole.michelsen.dk/blog/schedule-jobs-with-crontab-on-mac-osx/">mac crons</a>. However this is a hard restriction as my machine can&#39;t be shut down or sleeping.</p>

<p>There are out-of-the-box solutions like <a href="https://cloud.google.com/ai-platform-notebooks">AI Platform Notebooks</a> or <a href="https://colab.research.google.com/notebooks/intro.ipynb#recent=true">Colab</a> for writing and running code with live machines. Google also offers other managed products like <a href="https://cloud.google.com/composer">Cloud Composer</a>, not to mention the plethora of other non-Google solutions out there. These are great, I even tried a few of these out, but for one reason or the other (wrong use case, too many bells and whistles, expensive, restrictive, etc.), I decided to play with other toys.</p>

<p>I almost went with <a href="https://papermill.readthedocs.io/en/latest/">Papermill</a> as writing code in Jupyter is easy and fast. Papermill gives <code>.ipynb</code> files a level of productionization by allowing parameterization and execution. You can run something like <code>papermill gs://bucket-name/input.ipynb gs://bucket-name/output.ipynb -f parameters.yaml</code> to run and store (integrations include Google Cloud Storage).</p>

<p>There&#39;s are also <a href="https://cloud.google.com/blog/products/ai-machine-learning/best-practices-that-can-improve-the-life-of-any-developer-using-jupyter-notebooks">best practices</a> that go with productionizing Jupyter (<a href="https://github.com/nteract/testbook">testbook</a> for tests, <a href="https://nbdime.readthedocs.io/en/latest/">nbdime</a> for diffs, etc.). Jupyter is super easy to write in, and it supports many different programming languages. This is essentially the process that <a href="https://netflixtechblog.com/scheduling-notebooks-348e6c14cfd6">Netflix</a> and <a href="https://medium.com/bliblidotcom-techblog/how-to-deploy-and-schedule-jupyter-notebook-on-google-cloud-18a7ca23b463">Bilibili</a> use (+ <a href="https://www.youtube.com/watch?v=xU_xdogXFeE&amp;t=1768s&amp;ab_channel=GoogleWorkspace">this talk</a> and <a href="https://cloud.google.com/blog/products/ai-machine-learning/let-deep-learning-vms-and-jupyter-notebooks-to-burn-the-midnight-oil-for-you-robust-and-automated-training-with-papermill">this post</a>).</p>

<p>The tradeoffs for using Jupyter are speed, size (install notebook/kernel, papermill, apis), and money (VMs can be expensive). I created an MVP for this (pubsub –&gt; papermill).</p>

<p>In the end, the stuff that was productionized was just a rust API, a tiny CLI tool in rust with <code>reqwest</code> and <code>clap</code> that is basically a wrapper around another library.</p>

<pre><code>fn buy_asps(reqs: Endpoint) {
   let get_request = reqs.post_request(&#34;/orders&#34;, body);
}
</code></pre>

<p>When we get an event from PubSub, we trigger this business logic with a command like <code>cargo run -- --date 20210517 --function account --is_live</code>. There is enough flexibility to run different functions on different dates, using a live account or a paper account, and even more, depending on the PubSub signal. The signal is created by Cloud Scheduler, which is basically a cron. All of this is controlled in GCP&#39;s UI. The binary gets run by Cloud Functions.</p>

<p>Disclosure: this is no longer running.</p>

<p>This project costs less than a 30 cents a year. Note that all software is glorified automation, and there are other great options for other use cases.</p>
]]></content:encoded>
      <guid>https://cache.bwang.io/trading-automation</guid>
      <pubDate>Tue, 15 Nov 2022 01:38:40 +0000</pubDate>
    </item>
    <item>
      <title>api in rust</title>
      <link>https://cache.bwang.io/api-in-rust?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[After some notes in rust, I created a rust app in rust deployed on Google Kubernetes Engine (GKE).&#xA;&#xA;Here are some of the tooling/stack I went with. I started with the basic diesel example in actix/examples/diesel to bring up something with basic get/post features.&#xA;&#xA;Dev Tooling&#xA;  Use systemfd cargo-watch to automatically rebuild your code and watch for change. systemfd works by creating a parallel process, and then works with conjunction with cargo watch to reload your app whenever you save. Sometimes the reload doesn&#39;t work as intended; I had a weird bug where I had to restart whenever I added a new endpoint.&#xA;&#xA;      cargo install systemfd cargo-watch&#xA;    systemfd --no-pid -s http::5000 -- cargo watch -x run&#xA;  &#xA;  &#xA;I also created a tiny frontend to support the functionality. I also added an auth so that people. Ask me for the auth token if you&#39;d like to play with it!&#xA;&#xA;Create:&#xA;&#xA;      curl -S -X POST --header &#34;Content-Type: application/json&#34; --data &#39;{&#34;text&#34;:&#34;Hello World!&#34;}&#39; http://localhost:8080/post --header &#39;Authorization: Bearer ######&#39;&#xA;  &#xA;  {&#34;id&#34;:&#34;3afdebd0-673f-4a93-96f0-69e2ab99c756&#34;,&#34;text&#34;:&#34;Hello World!&#34;}&#xA;  &#xA;  Get:&#xA;&#xA;      curl -X GET http://localhost:8080/post/3afdebd0-673f-4a93-96f0-69e2ab99c756 --header &#39;Authorization: Bearer ######&#39;&#xA;  &#xA;  {&#34;id&#34;:&#34;3afdebd0-673f-4a93-96f0-69e2ab99c756&#34;,&#34;text&#34;:&#34;Hello World!&#34;}&#xA;  &#xA;  List:&#xA;&#xA;      curl -X GET http://localhost:8080/post/list --header &#39;Authorization: Bearer ######&#39;&#xA;  &#xA;  [{&#34;id&#34;: &#34;3afdebd0-673f-4a93-96f0-69e2ab99c756&#34;, &#34;text&#34;: &#34;Hello World!&#34;}]&#xA;  &#xA;  Delete&#xA;&#xA;  curl -X DELETE http://localhost:8080/post/3afdebd0-673f-4a93-96f0-69e2ab99c756 --header &#39;Authorization: Bearer ######&#39;&#xA;&#xA;{&#34;id&#34;:&#34;3afdebd0-673f-4a93-96f0-69e2ab99c756&#34;,&#34;text&#34;:&#34;Hello World!&#34;}&#xA;&#xA;deployment&#xA;&#xA;We dockerize our application and load it into gcp&#39;s container registry. Cool!&#xA;&#xA;  docker run gcr.io/rust-post/rust-post-crud:v1&#xA;Starting server at: 127.0.0.1:8080&#xA;&#xA;I clicked some buttons in the gcp UI, mapped the LoadBalancerIP to A record of my domain, and it just worked, live on rust.bwang.io.&#xA;&#xA;---&#xA;&#xA;Below are some notes I took when I was looking into rust, no idea where else to post it.&#xA;&#xA;Rust comes included with some nice modern tooling. Cargo is the dependency manager and build tool. Rustfmt is like gofmt, opinionated coding style across developers.&#xA;&#xA;I thought that it could also be a good opportunity to document and learn.&#xA;&#xA;1. Rust&#xA;&#xA;I&#39;m following the docs from doc.rust-lang.org with references from other parts of the internet. There&#39;s also rustlings and rust-lang/examples that I&#39;m also looking at for code examples. Here&#39;s are some popular tooling.&#xA;&#xA;1.1 Hello World&#xA;&#xA;\x\] [Guessing game tutorial done&#xA;&#xA;Do cargo new to intiate a project, and cargo run (builds if there are diffs and runs) to see what&#39;s up. The cargo.toml file is called the manifest. You can use it as a dependency manager, add meta information, specify build details (path, tests, etc), etc. The cargo command takes advantage of this manifest file to coordinate more complex projects (as opposed to just using rustc).&#xA;&#xA;Other information:&#xA;&#xA;Use cargo check to check your code to see if it compiles (faster than actually building). Builds debug executables are stored in ./target/debug. Build release executables are stored in ./target/release&#xA;The main function is the entry point into a program.&#xA;Use let to assign variables. Variables are immutable by default, use mut to make a variable mutable. Apparently there are a lot of nice things for handling reading by references in rust. We&#39;ll see about that later.&#xA;std::io::Result is a type a user uses to handle exceptions. It has two states (enums Ok and Err), .expect() checks for the error and handles it somehow.&#xA;std::cmp::Ordering is another enum that returns Less, Greater, and Equal when you compare two values. The match expression uses a arms pattern, similar to case. This seems to be a pattern, you can combine Result and match for error handling. See below (note that parse is a method to convert type to an annotated type, in this case, u32):&#xA;&#xA;  // example 1&#xA;  let guess: u32 = match guess.trim().parse() {&#xA;      Ok(num) =  num,&#xA;      Err() =  continue,&#xA;  };&#xA;  &#xA;&#xA;1.2 Rust Concepts&#xA;&#xA;1.2.1 Mutability&#xA;&#xA;In rust, variables are immutable by default (aside: however, because rust allows variable shadowing, we can bind a variable twice with a different value but at a different memory, we&#39;re basically creating a new variable). Mutating (mut) an instance in place maybe faster than creating a new instance at a different memory, but creating another instance might have higher clarity when writing code.&#xA;&#xA;Constants (const) are a little different from immutable variables (let). Constant types must be annotated and are evaluated at compile-time, whereas a let binding is about a run-time computed value.&#xA;&#xA;1.2.2 Data types&#xA;&#xA;Rust is a statically typed language so we know all the types of variables at compile time. Even when converting a variable to a different type (example 1), we need to annotate it.&#xA;&#xA;Rust has four primitive scalar types: integer (defaults to i32), floats (defaults to f64), bools, and characters. You can do basic mathematical operations on number types. char literals (4 bytes of a unicode scalar value) are specified with single quotes, string literals uses double quotes.&#xA;&#xA;Rust has two primitive compound types: tuples (fixed length, assorted types), arrays (fixed length, single type). Note that arrays are different from vectors (variable length).&#xA;&#xA;// example 2&#xA;&#xA;// tuples&#xA;let x: (i32, f64, u8) = (500, 6.4, 1);&#xA;let first = x.0;&#xA;&#xA;// arrays&#xA;let mut y: [i32; 3] = [0; 3];&#xA;let first = y[0]&#xA;&#xA;1.2.3 Functions&#xA;&#xA;For functions, I think is pretty standard. () evaluates to expressions where as {} is an expression (returns something). Statements have semicolons, expressions don&#39;t. Functions return the last expression implicitly.&#xA;&#xA;// example 3&#xA;&#xA;fn function(x: i32) {&#xA;    let y = {&#xA;        let x = 3;&#xA;        x + 1&#xA;    };&#xA;&#xA;    // returns y implicitly&#xA;}&#xA;&#xA;1.2.4 Ownership&#xA;&#xA;Ownership is one of the key concepts of rust.&#xA;&#xA;For starters, a stack is a part of memory that&#39;s last in, first out, everything fixed size. When you exit a function, you&#39;re popping off plates off the stack, and all the variables with it. (C++ uses RAII, which is rust&#39;s drop function). A heap is for data with unknown size at compile time (for example, a string), and the heap returns some information (pointer, size, etc) to store on the stack.&#xA;&#xA;For rust, each value has an owner. There can only be one owner at a time. when the owner goes out of scope, the value is also gone with it. Let&#39;s say we have two variables referencing the same string:&#xA;&#xA;// example 4&#xA;&#xA;// s1 not valid&#xA;let s1 = String::from(&#34;hello&#34;);&#xA;let s2 = s1;&#xA;&#xA;// s1 valid&#xA;let s1 = String::from(&#34;hello&#34;);&#xA;let s2 = s1.clone();&#xA;&#xA;Traditionally, s1 and s2 point to the same reference. To ensure memory safety, rust no longer considers s1 here valid after s2 is created. There are no double memory free errors when there&#39;s a one to one relationship between references and resource. If we really wanted to, we can do a .clone() for heap variables to copy data.&#xA;&#xA;Likewise, for exiting and entering functions, the ownership of a heap variable changes, and the previous variable is decommissioned.&#xA;&#xA;The ownership of some stack variable, for example, integer or a memory reference, can still be used after the owernship changes. It doesn&#39;t use the .drop() function, it uses .Copy() instead.&#xA;&#xA;// example 5&#xA;&#xA;fn main() {&#xA;  let s = String::from(&#34;hello&#34;);&#xA;  takesownership(s);&#xA;  // s is no longer valid here&#xA;  &#xA;  let s1 = String::from(&#34;hello&#34;);&#xA;  borrowsreference(&amp;s1)&#xA;  // s is still valid here&#xA;  &#xA;}&#xA;&#xA;fn takesownership(somestring: String) {&#xA;  println!(&#34;{}&#34;, somestring);&#xA;}&#xA;&#xA;fn borrowsreference(somestring: String) {&#xA;  s.len()&#xA;}&#xA;&#xA;But how do we use some heap variable after it enters a function? We can borrow the variable via reference. Because memory addresses (references) are stored on the stack and uses .Copy(), the ownership of the resource is still in 