<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Weekly Typed</title>
    <description>The latest articles on DEV Community by Weekly Typed (@weeklytyped).</description>
    <link>https://dev.to/weeklytyped</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F116438%2F63fb2818-40ea-4561-ab6b-9498d7413e60.png</url>
      <title>DEV Community: Weekly Typed</title>
      <link>https://dev.to/weeklytyped</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/weeklytyped"/>
    <language>en</language>
    <item>
      <title>Embedded Rust on ESP32</title>
      <dc:creator>Weekly Typed</dc:creator>
      <pubDate>Mon, 04 Sep 2023 17:39:39 +0000</pubDate>
      <link>https://dev.to/weeklytyped/embedded-rust-on-esp32-n1f</link>
      <guid>https://dev.to/weeklytyped/embedded-rust-on-esp32-n1f</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--f-S96xLB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://images.unsplash.com/photo-1599481238505-b8b0537a3f77%3Fcrop%3Dentropy%26cs%3Dtinysrgb%26fit%3Dmax%26fm%3Djpg%26ixid%3DM3wxMTc3M3wwfDF8c2VhcmNofDgyfHxyb2JvdHxlbnwwfHx8fDE2OTM4NDkxMzF8MA%26ixlib%3Drb-4.0.3%26q%3D80%26w%3D2000" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--f-S96xLB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://images.unsplash.com/photo-1599481238505-b8b0537a3f77%3Fcrop%3Dentropy%26cs%3Dtinysrgb%26fit%3Dmax%26fm%3Djpg%26ixid%3DM3wxMTc3M3wwfDF8c2VhcmNofDgyfHxyb2JvdHxlbnwwfHx8fDE2OTM4NDkxMzF8MA%26ixlib%3Drb-4.0.3%26q%3D80%26w%3D2000" alt="Rust on ESP32" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A while back, I bought a STM32F3 Discovery board, fully intending to use it to complete the &lt;a href="https://docs.rust-embedded.org/discovery/?ref=weekly-typed.com"&gt;Discovery Book&lt;/a&gt;.  Unfortunately, it took a long time to ship, and most of the novelty had worn off by the time I got started.  I barely completed the introductory, blinking LED project, and the Discovery board has been sitting in a drawer ever since.&lt;/p&gt;

&lt;p&gt;These interests of mine tend to be cyclical, though, and embedded development finally came back up recently.  I was seeing some interesting projects on YouTube channels like &lt;a href="https://www.youtube.com/@VolosProjects?ref=weekly-typed.com"&gt;Volos Projects&lt;/a&gt;, that introduced me to ESP32 and the associated line of development boards.  It turns out ESP32 boards have some neat features, like wifi and bluetooth.  They are also super popular.  So when, I noticed regular updates to &lt;code&gt;esp-hal&lt;/code&gt; showing up in &lt;a href="https://this-week-in-rust.org/?ref=weekly-typed.com"&gt;This Week in Rust&lt;/a&gt;, I got a little excited.&lt;/p&gt;

&lt;p&gt;As it happens, Espressif (the company that makes ESP32) and the &lt;a href="https://github.com/esp-rs?ref=weekly-typed.com"&gt;Rust on ESP Community&lt;/a&gt; have been going pretty hard to make Rust on ESP easy.&lt;/p&gt;

&lt;p&gt;Here's a bit about what I've learned.&lt;/p&gt;

&lt;h2&gt;
  
  
  A proper hosted environment
&lt;/h2&gt;

&lt;p&gt;Look, programming on bare metal sounds cool.  It sounds super hackery.  But I don't want to dive into that right off the bat.  I do want some guardrails so I don't lose my way.  But, at the same time, I'm not really drawn to dev boards like Arduino and Raspberry Pi.  The vibe I get from them is a high level of abstraction.&lt;/p&gt;

&lt;p&gt;ESP32 development has great Rust support, and the level of abstraction is right where I want it.  The Espressif Integrated Development Framework (ESP-IDF) provides a base layer of components that makes it a lot easier to build applications, including a "newlib" that enables use of Rust's standard library &lt;code&gt;std&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;ESP-IDF also Includes an implementation of FreeRTOS.  So you can write proper async code, instead of complex timers to make things happen at the right time.  Again, it's all about building cool projects without too much headache.&lt;/p&gt;

&lt;h2&gt;
  
  
  Books
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://esp-rs.github.io/book/introduction.html?ref=weekly-typed.com"&gt;Rust on ESP Book&lt;/a&gt; (book)&lt;br&gt;&lt;br&gt;
&lt;a href="https://esp-rs.github.io/std-training?ref=weekly-typed.com"&gt;Embedded Rust on Espressif&lt;/a&gt; (book/training from Espressif)&lt;/p&gt;

&lt;h2&gt;
  
  
  Wokwi
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://wokwi.com/?ref=weekly-typed.com"&gt;Wokwi&lt;/a&gt; is like Codepen for embedded projects.  It's one part website and one part VS Code extension.  On the site, you can view, clone and create new projects, and use in-browser code editor and simulator to get a simple project running with no fuss.  The VS Code extension basically integrates the simulator into your editor.&lt;/p&gt;

&lt;p&gt;From their docs:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Wokwi simulates a wide variety of hardware components, including microcontrollers, sensors, displays, and more. It supports the following architectures: ARM, AVR, RISC-V, and Xtensa.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And there is a whole page dedicated to &lt;a href="https://wokwi.com/rust?ref=weekly-typed.com"&gt;Rust projects&lt;/a&gt;.  It's an awesome way to get started without buying anything!  You can get started and have a blinking LED project in a couple seconds.  And when you're ready, you can even flash your board directly from Wokwi.&lt;/p&gt;

&lt;h2&gt;
  
  
  Easy project setup
&lt;/h2&gt;

&lt;p&gt;The esp-rs project has a set of project template that make creating new projects a breeze.    You can use them with &lt;code&gt;cargo-generate&lt;/code&gt;, and after answering a few questions, you'll be set up with either a &lt;code&gt;no_std&lt;/code&gt; or &lt;code&gt;std&lt;/code&gt; project, complete with configs Dev Containers that integrate with Wokwi simulator!  You couldn't get much simpler.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;So ESP32 checks a lot of boxes for me.  It's an affordable, powerful microcontroller that has dev boards with lots of cool features.  There is ample Rust support, and good learning resources.  You can get started quickly with Wokwi, learn embedded development by building cool things.  All without resorting to Python or C/C++.&lt;/p&gt;

&lt;p&gt;See the original post over at my blog, &lt;a href="//www.weekly-typed.com/rust-on-esp32"&gt;Weekly Typed&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>First Thoughts on Zig - Getting Started and Learning Resources</title>
      <dc:creator>Weekly Typed</dc:creator>
      <pubDate>Sun, 05 Feb 2023 15:10:45 +0000</pubDate>
      <link>https://dev.to/weeklytyped/first-thoughts-on-zig-getting-started-and-learning-resources-34fc</link>
      <guid>https://dev.to/weeklytyped/first-thoughts-on-zig-getting-started-and-learning-resources-34fc</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.unsplash.com%2Fphoto-1618907325987-8956fe9b4817%3Fcrop%3Dentropy%26cs%3Dtinysrgb%26fit%3Dmax%26fm%3Djpg%26ixid%3DMnwxMTc3M3wwfDF8c2VhcmNofDE4fHx5ZWxsb3clMjBsaXphcmR8ZW58MHx8fHwxNjc0NTA0MDI5%26ixlib%3Drb-4.0.3%26q%3D80%26w%3D2000" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.unsplash.com%2Fphoto-1618907325987-8956fe9b4817%3Fcrop%3Dentropy%26cs%3Dtinysrgb%26fit%3Dmax%26fm%3Djpg%26ixid%3DMnwxMTc3M3wwfDF8c2VhcmNofDE4fHx5ZWxsb3clMjBsaXphcmR8ZW58MHx8fHwxNjc0NTA0MDI5%26ixlib%3Drb-4.0.3%26q%3D80%26w%3D2000" alt="First Thoughts on Zig - Getting Started and Learning Resources" width="2000" height="1319"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This post originally appeared on &lt;a href="https://www.weekly-typed.com/first-thoughts-on-zig/" rel="noopener noreferrer"&gt;Weekly Typed&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In January 2023, I delved into the Zig programming language. If that's unfamiliar, check out &lt;a href="https://ziglang.org/" rel="noopener noreferrer"&gt;the website&lt;/a&gt; for a rundown of what it's about. &lt;a href="https://youtu.be/Gv2I7qTux7g" rel="noopener noreferrer"&gt;The Road to Zig 1.0&lt;/a&gt; is also a great talk by Andrew Kelley explaining why he created it. I had heard about Zig a while back but only got interested enough to learn it because the &lt;a href="https://bun.sh" rel="noopener noreferrer"&gt;Bun&lt;/a&gt; runtime for Typescript/Javascript piqued my interest. And that project is written in Zig.&lt;/p&gt;

&lt;p&gt;Anyway. Here are some initial thoughts I had trying to get started and learn the language.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting started
&lt;/h2&gt;

&lt;p&gt;The getting started guide was beneficial. It was easy to install the zig compiler and toolchain on Mac (via Homebrew) and Windows (via Chocolatey).&lt;/p&gt;

&lt;p&gt;I did run into one snag when installing extensions on VS Code. The guide mentions several options, but most people will probably want &lt;a href="https://marketplace.visualstudio.com/items?itemName=AugusteRame.zls-vscode" rel="noopener noreferrer"&gt;zls-vscode&lt;/a&gt;. I installed another extension by mistake, which only gave me syntax highlighting and a small amount of linting. Which is what the guide actually tells you if you read it. &lt;code&gt;zls-vscode&lt;/code&gt; is a frontend for the Zig language service (zls). When you install it, you will be prompted to install zls. This gives you all the features of the other extensions and more.&lt;/p&gt;

&lt;h2&gt;
  
  
  Learning resources
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/ratfactor/ziglings" rel="noopener noreferrer"&gt;Ziglings&lt;/a&gt; is a great way to learn the basics of the language. It is a repository with a series of one-file programs. At the top of each file, comments give you information about one concept in Zig. Each program is broken in some way related to that concept. Your goal is to fix it with the help of the comments.&lt;/p&gt;

&lt;p&gt;There are a few things to know before going in.&lt;/p&gt;

&lt;p&gt;First, Ziglings needs to be updated in places. Zig is not yet to version 1.0. So don't be too surprised if some field names of common types have changed, and Ziglings still needs to catch up.&lt;/p&gt;

&lt;p&gt;Second, Ziglings only covers some things. Once you are done with it, give the docs a look. They are great and cover everything.&lt;/p&gt;

&lt;p&gt;Because Zig is still so young, there are few other resources to learn from&lt;/p&gt;

&lt;h2&gt;
  
  
  Next
&lt;/h2&gt;

&lt;p&gt;That's it for now. In a future post, I will discuss my thoughts on some features of Zig. Some of them are familiar, but Zig does them differently. Others are very unique.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Error handling&lt;/li&gt;
&lt;li&gt;Optionals&lt;/li&gt;
&lt;li&gt;Unions&lt;/li&gt;
&lt;li&gt;Types as values&lt;/li&gt;
&lt;li&gt;Comptime&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>zig</category>
      <category>programminglanguages</category>
    </item>
    <item>
      <title>Compilers Could Be Way More Fun</title>
      <dc:creator>Weekly Typed</dc:creator>
      <pubDate>Sat, 21 Jan 2023 18:37:50 +0000</pubDate>
      <link>https://dev.to/weeklytyped/compilers-could-be-way-more-fun-534l</link>
      <guid>https://dev.to/weeklytyped/compilers-could-be-way-more-fun-534l</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.unsplash.com%2Fphoto-1616892698956-e9a649a991b5%3Fcrop%3Dentropy%26cs%3Dtinysrgb%26fit%3Dmax%26fm%3Djpg%26ixid%3DMnwxMTc3M3wwfDF8c2VhcmNofDI3fHxiaXNvbiUyMHNub3d8ZW58MHx8fHwxNjc0MzI3NTA2%26ixlib%3Drb-4.0.3%26q%3D80%26w%3D2000" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.unsplash.com%2Fphoto-1616892698956-e9a649a991b5%3Fcrop%3Dentropy%26cs%3Dtinysrgb%26fit%3Dmax%26fm%3Djpg%26ixid%3DMnwxMTc3M3wwfDF8c2VhcmNofDI3fHxiaXNvbiUyMHNub3d8ZW58MHx8fHwxNjc0MzI3NTA2%26ixlib%3Drb-4.0.3%26q%3D80%26w%3D2000" alt="Compilers Could Be Way More Fun" width="2000" height="1103"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This post originally appeared on &lt;a href="https://www.weekly-typed.com/compilers-could-be-way-more-fun/" rel="noopener noreferrer"&gt;Weekly Typed&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I've had this idea kicking around in my head for a while.&lt;/p&gt;

&lt;p&gt;For the past year, I've been slowly learning about compilers, DSLs, and language engineering. It's a lot to learn, for sure. But it's a lot harder given the resources available. Sure, there are textbooks, approachable books, some video series. But there just are not &lt;em&gt;enough&lt;/em&gt; of them.&lt;/p&gt;

&lt;h2&gt;
  
  
  We need more voices to learn from
&lt;/h2&gt;

&lt;p&gt;Many years ago, I decided to read a book by Tony Robbins. I don't remember the book, and I had too short of an attention span to finish the first chapter. But even in those few pages, I found something that's stuck with me. It's obvious, actually, but easy to forget.  &lt;/p&gt;

&lt;p&gt;To paraphrase him: sometimes you can hear the same thing explained 9 times by 9 different people and it still doesn't click. Then that 10th person explains it, and it all falls into place. They don't have to be particularly clever about it, either.  Maybe they just think a little more like you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Missing a modern approach
&lt;/h2&gt;

&lt;p&gt;There are some other things that are just missing in the existing resources. For example, usually the project's build setup is glossed over. This makes sense, because it seems outside the scope of a book or video. But here's the thing. Even if I don't know the language you're using in your book, I can figure out what you're doing. But I might not have any clue how your build tools work. So if I have to debug your build script before I can start, you've lost me.&lt;/p&gt;

&lt;p&gt;It would be nice to use some modern services to get people set up and working through a practical project. Something like &lt;a href="https://www.gitpod.io/" rel="noopener noreferrer"&gt;gitpod&lt;/a&gt; or github workspaces would be a HUGE improvement! Or what about tools like &lt;a href="https://github.com/rust-lang/rustlings" rel="noopener noreferrer"&gt;Rustlings&lt;/a&gt; or &lt;a href="https://github.com/ratfactor/ziglings" rel="noopener noreferrer"&gt;Ziglings&lt;/a&gt;? This is starting to sound like a job for a community.&lt;/p&gt;

&lt;h2&gt;
  
  
  Compiler-nomicon
&lt;/h2&gt;

&lt;p&gt;So that's what I'm going to try to build. The initial steps will be to create an open source document designed to help anyone understand (and build!) all the parts of a compiler. But I want to quickly expand from there, to include all kinds of topics related to language and compiler design. Not just the basics, and not just high-level. Advanced topics about real features you find in real languages.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;For example, many books teach you how to build things like simple functions, methods, structs and classes into a new language. But what about enums, interfaces, traits, ownership, pointers, records, type classes, data classes, higher order functions, lambda/nameless functions, and so on. I want to get into that.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Around this documentation, I want to build a community of contributors. I want the code examples to be in as many languages as possible. If you're interested in helping, you can get involved a couple ways. You can either sign up for updates to this blog, leave a comment, or email me directly. See the about page of this site for the details. The documentation will be on &lt;a href="https://github.com/tofraley" rel="noopener noreferrer"&gt;github&lt;/a&gt;, so we'll coordinate there.&lt;/p&gt;

&lt;p&gt;I'll have more to say on this soon. If you have any questions or feedback, sign up and comment!&lt;/p&gt;

&lt;p&gt;Thanks for reading.&lt;/p&gt;

</description>
      <category>compilers</category>
    </item>
    <item>
      <title>Playing with the Amethyst Game Engine</title>
      <dc:creator>Weekly Typed</dc:creator>
      <pubDate>Fri, 22 May 2020 11:36:46 +0000</pubDate>
      <link>https://dev.to/weeklytyped/playing-with-the-amethyst-game-engine-35ij</link>
      <guid>https://dev.to/weeklytyped/playing-with-the-amethyst-game-engine-35ij</guid>
      <description>&lt;p&gt;I realized today I had never tried game development, so I figured I would stay up too late and give it a go.&lt;/p&gt;

&lt;p&gt;Entity-Component-System is an architectural pattern used in game development.  &lt;/p&gt;

&lt;p&gt;Every object in the game is an entity, which is made up of components that contain state.  &lt;/p&gt;

&lt;p&gt;Systems create the behavior by manipulating an entity's components.&lt;/p&gt;

&lt;p&gt;That's my understanding anyway!  &lt;/p&gt;

&lt;p&gt;In this stream, I'm learning to build a pong-like game using the game engine Amethyst (&lt;a href="https://amethyst.rs"&gt;https://amethyst.rs&lt;/a&gt;).  Pretty great docs for beginners!  &lt;/p&gt;

&lt;p&gt;Built with Rust of course. :) &lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/QbWMf-rtLPM"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>rust</category>
    </item>
    <item>
      <title>What do you wish companies would put in job listings?</title>
      <dc:creator>Weekly Typed</dc:creator>
      <pubDate>Tue, 25 Jun 2019 16:19:07 +0000</pubDate>
      <link>https://dev.to/weeklytyped/what-do-you-wish-companies-would-put-in-job-listings-6eb</link>
      <guid>https://dev.to/weeklytyped/what-do-you-wish-companies-would-put-in-job-listings-6eb</guid>
      <description>&lt;p&gt;Here's mine:&lt;/p&gt;

&lt;p&gt;Please, please just tell me what tech stack you use in the listing!!!&lt;/p&gt;

&lt;p&gt;Even better if you can give me an idea of what I would use.  This is omitted all the time.  It's understandable if you don't care if I have experience in your particular stack, but I still want to know what it is.&lt;/p&gt;

&lt;p&gt;What would you like to see more of?&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>career</category>
    </item>
  </channel>
</rss>
