---
title: Fixing bugs in rustc and studying MDPs
tags: log
---

I (probably) fixed a bug in `rustc` today: [PR][E0252-fix]. It's similar to the E0256 bug that I [fixed yesterday][E0256-fix]: for that one, it reported "submodule" in certain cases when it should've reported "trait" or "type", and for this new one it reported "type" when it should've been reporting "trait" or "module". The logic is simple, but it still took me quite a while to figure out where to get the data I needed from (my first attempt was incorrect, and then I had to recompile `rustc` to enable debug, and yadda yadda yadda).

(The reason both messages had a similar problem is that rustc uses two different namespaces for imports: one for types and one for values. Traits, types and modules all share the type namespace, and both error messages were previously just checking which namespace it used and reporting that.)

So with this PR out, I'm looking for another `rustc` bug to squash. The diagnostics label on the issue tracker seems to have plenty of easy bugs, and I'm probably going to look at [issue 25694] next.

I've also started trying to read [Algorithms for Reinforcement Learning][Algs-for-RL] a couple days ago. I read through section 2.2, but it didn't really gel for me, so I'm planning to read chapters 2-4 of Puterman's book on Markov decision processes and then try again.

Also, today I remembered that a couple months ago I had planned to write a blog post defining and comparing the Riemann and Darboux integrals, but had never started writing it. I'm going to revisit that today or tomorrow.

[E0252-fix]: https://github.com/rust-lang/rust/pull/26385
[E0256-fix]: https://github.com/rust-lang/rust/pull/26358
[issue 25694]: https://github.com/rust-lang/rust/issues/25694
[Algs-for-RL]: http://www.ualberta.ca/~szepesva/RLBook.html

Add initial draft of log post
Add initial draft of log post
