Skip to content

Commit 1ecd3ba

Browse files
committed
incorportaing @craftloops notes, they've been awesome
1 parent bc39799 commit 1ecd3ba

File tree

3 files changed

+64
-60
lines changed

3 files changed

+64
-60
lines changed

_drafts/2017-rust-impl-period.md

Lines changed: 39 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -10,66 +10,71 @@ path: 2017/rust-impl-period
1010

1111
The [Rust programming language](https://www.rust-lang.org) is a self-declared
1212
"systems programming language that runs blazingly fast, prevents segfaults, and
13-
guarantees thread safety." It's
13+
guarantees thread safety." Its
1414
[impl period](https://internals.rust-lang.org/t/the-final-impl-period-newsletter/6408)
1515
is a sort of seasonal community Rust project, or organization of projects.
1616
To paraphrase [Aaron Turon](https://internals.rust-lang.org/t/announcing-the-impl-period-sep-18-dec-17/5676),
1717
it is a time for the Rust community to come together to focus on implemenation
1818
work rather than design/RFC work.
1919

20-
I've been lucky enough to have had the opportunity learn Rust in order to write
21-
it at work over the last year or so. [PolySync](https://polysync.io/) is
20+
I've been lucky enough to have had the opportunity to learn Rust in order to write
21+
it at work at [PolySync](https://polysync.io/) over the last year or so.
22+
[PolySync](https://polysync.io/)'s
2223
[a friend of Rust](https://www.rust-lang.org/en-US/friends.html) and we've been
2324
moving from _using_ Rust to _favoring_ it. My experience with the language at
24-
work drove me to explore the ecosystem on my own and to eventually to write
25-
Rust for myself, outside of work. I recently published a crate I'm reasonably
26-
proud of called [bnf](https://crates.io/crates/bnf), a library for parsing
27-
Backus–Naur form context-free grammars. I also recently participated in
28-
_the impl period_, something I'm reasonably proud of as well.
25+
work drove me to explore the ecosystem independently and to eventually to write
26+
Rust for myself, outside of work. I'm reasonably
27+
proud of a recently published crate [bnf](https://crates.io/crates/bnf), a library for parsing
28+
Backus–Naur form context-free grammars. Participating in the
29+
_the impl period_ is something I'm reasonably proud of as well.
2930

3031
## A quickchecking crate
3132

3233
My part in Rust's _the impl period_ project was work for
3334
[bindgen](https://github.com/rust-lang-nursery/rust-bindgen), a tool that makes
3435
life better for Rust developers that need to use C or C++ by automatically
35-
genertating bindings to existing libraries. It's something I'd used in the
36+
generating bindings to existing libraries. It's something I'd used in the
3637
past for exactly that, writing Rust code that interfaces with existing C.
3738
It did everything it promised and I'm incredibly glad it's in the ecosystem.
3839

39-
Though I didn't directly touch any of _bindgen's_ functionality, the work I
40-
did will hopefully help contribute to its growth. I took on the call to
41-
[add property based testing with quickcheck](https://github.com/rust-lang-nursery/rust-bindgen/issues/970).
42-
For anyone unfamiliar, some of the power of property testing might be boiled
43-
down to it's efficiency in testing an exahustive set of inputs. One property test
40+
Though not directly affecting any of _bindgen's_ functionality, the
41+
[quickchecking crate](https://github.com/rust-lang-nursery/rust-bindgen/tree/master/tests/quickchecking)
42+
written to tackle the
43+
_[Add property based testing with quickcheck](https://github.com/rust-lang-nursery/rust-bindgen/issues/970)_
44+
issue will hopefully help contribute to its growth.
45+
Some of the power of property testing might be boiled
46+
down to its efficiency in testing an exhaustive set of inputs. One property test
4447
has the potential to excercise what in other paradigms, often requires an
4548
impractical or even impossible number of individual tests.
4649
[quickcheck](https://github.com/BurntSushi/quickcheck) is a Rust package that
4750
enables writing property tests
4851
(in the vein of [the original QuickCheck written in Haskell](https://en.wikipedia.org/wiki/QuickCheck))
4952
for Rust projects.
5053

51-
My contributions were the following PRs:
54+
My contributions were captured by the following pull requests made to the
55+
[rust-lang-nursery/rust-bindgen](https://github.com/rust-lang-nursery/rust-bindgen)
56+
GitHub repository:
5257

5358
* [Property testing with quickcheck](https://github.com/rust-lang-nursery/rust-bindgen/pull/1159)
5459
* [Quickchecking crate CLI](https://github.com/rust-lang-nursery/rust-bindgen/pull/1177)
5560
* [Enable Cargo features for quickchecking crate](https://github.com/rust-lang-nursery/rust-bindgen/pull/1180)
5661

57-
I count my experience as a success. Not because I was able to see three PRs
58-
merged and the corresponding issues closed but becasue I was noticed by
59-
[@steveklabnik](https://twitter.com/steveklabnik) (haha who does a pretty damn good
60-
job summing up the work I did with, "bindgen uses quickcheck to generate random
61-
c header files and then tries to parse them".).
62+
I count my experience as a success. Mostly because three PRs were
63+
merged and the corresponding issues closed and a little bit because the
64+
crate was noticed by [@steveklabnik](https://twitter.com/steveklabnik)
65+
(who does a pretty damn good job summing up its function, "bindgen uses
66+
quickcheck to generate random c header files and then tries to parse them".).
6267

6368
<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr">bindgen uses quickcheck to generate random c header files and then tries to parse them <a href="https://t.co/HYftqPra7L">https://t.co/HYftqPra7L</a></p>&mdash; Some(@steveklabnik) (@steveklabnik) <a href="https://twitter.com/steveklabnik/status/939238891118350337?ref_src=twsrc%5Etfw">December 8, 2017</a></blockquote>
6469
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
6570

6671
Check [this gist](https://gist.github.com/snewt/1b0ca76207139681d98b4d709b8c09ed)
6772
for a peek into what a couple randomly generated C headers look like.
6873

69-
While I wasn't able to meet the goal of uncovering
74+
While unable to meet the goal of uncovering
7075
["many hidden issues via fuzzing"](https://paper.dropbox.com/doc/bindgen-xTXplHlfqJpnDvPhMqmfW), the
7176
[quickchecking crate](https://github.com/rust-lang-nursery/rust-bindgen/tree/master/tests/quickchecking)
72-
has caught [one new bug](https://github.com/rust-lang-nursery/rust-bindgen/issues/1153),
77+
has caught [one new bug](https://github.com/rust-lang-nursery/rust-bindgen/issues/1153)
7378
and is able to regularly catch a couple others,
7479
[#550](https://github.com/rust-lang-nursery/rust-bindgen/issues/550)
7580
and [#684](https://github.com/rust-lang-nursery/rust-bindgen/issues/684). To me
@@ -88,31 +93,31 @@ that went right that may be out of the ordinary.
8893

8994
* I live in Portland, OR where [the sponsor of the Rust project](https://research.mozilla.org/rust/) Mozilla has a presence.
9095

91-
* I was able to go to an impl period Meetup and pick [@fitzgen](https://github.com/fitzgen)'s brain in person, the impl period's [bindgen](https://github.com/rust-lang-nursery/rust-bindgen) project lead.
96+
* There was an impl period Meetup nearby where I was able to pick [@fitzgen](https://github.com/fitzgen)'s brain in person, the impl period's [bindgen](https://github.com/rust-lang-nursery/rust-bindgen) project lead.
9297

9398
It's also worth noting the things that I expect apply more generally.
9499

95-
* The presence of a Gitter channel influenced my decision to contribute. I didn't actually use it much but it allowed me to wave, say hi and get a wave back. It was some human interaction that helped reinforce that my work would be seen and that if I did need somthing, it would be there.
100+
* The presence of [a Gitter channel](https://gitter.im/rust-impl-period/WG-dev-tools-bindgen) influenced the decision to contribute. While I didn't actually use it much, it allowed me to wave, say hi and get a wave back. It was some human interaction that helped reinforce that my work would be seen and that if I did need something, it would be there.
96101

97102
* I loved the newsletters.
98103

99-
* I went to an impl period Meetup and my engagement with the Rust community was enormously positive.
104+
* My engagement with the Rust community was enormously positive.
100105

101-
* The impl period documentation was really, really great. The volume of it all was a bit daunting at first but I ended up appreciating that I was able to browse until something felt right. I was able to settle on a problem that sounded interesing to me and represented a chance to learn.
106+
* The impl period documentation was really, really great. The volume of it all was a bit daunting at first but ended up allowing me to browse until something felt right. I was able to settle on a problem that sounded interesting and represented a chance to learn.
102107

103-
* When I took on the project I had a clear idea of how to tackle it and that clear idea was __completely__ misguided. Mapping out a new solution and implementing it really scratched the itch.
108+
* When I took on the project it was with a clear idea of how to tackle it and that clear idea was __completely__ misguided. Mapping out a new solution and implementing it really scratched the itch.
104109

105110

106-
I had a fantastic time participating and I hope the impl period is an every year
107-
thing. I also feel like I genuinely leveled up as a Rust developer, in some part
108-
because I had a new problem to solve but largely because of the incredibly
109-
thourough and thoughtful feedback I got from
111+
Participating was a fantastic experience, I hope the impl period is an every year
112+
thing. It provided a feeling of genuinely leveling up as a Rust developer,
113+
in some part because it was a new problem to solve but largely because of the incredibly
114+
thorough and thoughtful feedback from
110115
[@fitzgen](https://github.com/fitzgen) who reviewed my PRs.
111116

112117
For more info on implementation details I'll probably do a follow up
113-
post, but in the meantime, if you're interested in knowing more about it I'll
114-
recommend checking out the conversations in the PRs linked to above or
115-
reaching out on Twitter, I'm [@shnewto](https://twitter.com/shnewto).
118+
post, but in the meantime, if you're interested in knowing more about it check out
119+
the conversations in the PRs linked to above or
120+
reaching out on Twitter, [@shnewto](https://twitter.com/shnewto).
116121

117122
I'd like to offer a really enthusiastic thank you to the Rust community and
118123
everyone involved in organizing and running the impl period for 2017. I'm glad

posts/2017-cobalt-and-now.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,55 +24,55 @@ areas that I don't have much experience. That part of me won out.
2424

2525
I've had some positive experiences with [Hugo](https://gohugo.io/) which made a
2626
lot of the work seem
27-
approachable but I wanted to explore alternative options, namely what Rust had
27+
approachable but wanted to explore alternative options, namely what Rust had
2828
to offer in the arena. A quick browser search for "static site generator rust"
2929
turns up a handful of options, but out of those, two seemed especially
30-
suited to what I was interested in.
30+
suited to the task.
3131
[Gutenberg](https://github.com/Keats/gutenberg) and
3232
[cobalt.rs](https://github.com/cobalt-org/cobalt.rs).
3333

3434
### Decisions
3535
The docs for both seemed approachable so I felt optimistic that either choice
3636
would be manageable with effort. Because my experience is especially slim in
3737
design, my choice ultimately came down to finding an existing site built with
38-
either of the tools that had an aesthetic I liked and could pull from.
38+
either of the tools that had a relatable aesthetic to pull from.
3939

4040
[Matthias Endler's blog](https://matthias-endler.de/) sold me, it's beautiful.
4141
Walking through [that code base](https://github.com/mre/mre.github.io) was a
4242
fantastic tutorial on using cobalt.rs and _this_ site, especially
4343
my CSS, leans pretty heavily on what I learned there.
4444

4545
### Lessons
46-
Initially I didn't appreciate the `.md` and `.liquid` interchangeability. My
46+
Initially I didn't appreciate the `.md` and `.liquid` interchangeability. The
4747
first pass only used Markdown but then I wanted to incorporate styling... That's
4848
where the `.liquid` extension comes in! It lets you incorporate raw HTML,
4949
and all the power that comes with it, into any page (which in my mind is magical
50-
CSS and JavaScript ha). I love that I'm not constrained to Markdown but have it
50+
CSS and JavaScript ha). I love that not being constrained to Markdown but having it
5151
in the toolbox.
5252

5353
### It's built, now what?
54-
Okay, I dug in, hacked some CSS, learned what I could and couldn't do with
54+
Okay, I dug in, hacked some CSS, learned what was and wasn't possible with
5555
Markdown, fought the urge to duplicate the `.liquid` files in the `_layouts`
5656
directory without gaining anything from it and finally had something I thought
5757
I could run with.
5858
But now what? I've been getting paid to write software
5959
for a few years now and I've never had to learn or cemented how to go from local
6060
files to a live website. 🙃. Where does all that happen? Do I need a _hosting_
6161
account?
62-
Which one? I've heard the words _Digital Ocean droplet_, that's probably
63-
something... Then I remembered a video I'd been recommended by a friend ages
62+
Which one? The words _Digital Ocean droplet_, probably mean
63+
something... Then a memory surfaced of video I'd been recommended by a friend ages
6464
ago on [now & next](https://www.youtube.com/watch?v=__b6k2pR3Tg&t=5s),
6565
Node.js packages that I didn't really have an application for
66-
at the time. I thought I'd try it out. And damn, `now` is a super power.
66+
at the time. I tried it out and damn, `now` is a super power.
6767

6868
Here were the steps I took to get my blog up and running during development:
6969
1. Install [now](https://zeit.co/download#now-cli).
7070
1. What does `now -h` give me? Ah `deploy` seems promising.
7171
1. Build the side with `cobalt build`
7272
1. `now deploy _site`? Bam! Live website with a generated URL.
7373

74-
Totally, totally, sold, I ended up springing for the step above free account
75-
so I could associate my custom domains with the deploys and also support
74+
Totally, totally, sold, I ended up springing for the step above a free account to
75+
associate custom domains with the deploys and also support
7676
something that blew my mind.
7777

7878
### Final thoughts

posts/2017-embedded-elm.liquid

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ path: 2017/embedded-elm
1010
<p>
1111
I've been interested in dipping my toes into the Elm language for some time
1212
and also, curious about whether it was possible / reasonable to integrate
13-
something I wrote in Elm into the Cobaly tooling used to generate this blog.
13+
something written in Elm into the Cobalt tooling used to generate this blog.
1414
<br><br>
1515
Integration was trivial so major points to Cobalt. After generating the
16-
JavaScript (<i>elm-make Bob.elm --output=embedded-elm.js</i>), I was
17-
able to use raw HTML in this post's <i>.liquid</i> file to embed that
18-
script like any other <i>.js</i> file... Or almost. This post's window into Elm
19-
is accomplished as follows:
16+
JavaScript (<i>elm-make Bob.elm --output=embedded-elm.js</i>), it was
17+
embedded script like any other <i>.js</i> file in the raw HTML of this
18+
post's <i>.liquid</i> file... Or almost. The HTML + Elm was accomplished
19+
as follows:
2020

2121
<pre>
2222
<code>&lt;head&gt;
@@ -31,22 +31,21 @@ is accomplished as follows:
3131

3232
<br><br>
3333
Learning enough Elm to make something happen was the difficulty. I love
34-
language learning tooling like <a href="http://exercism.io">exercism.io</a> so I started there.
34+
language learning tooling like <a href="http://exercism.io">exercism.io</a> so started there.
3535
Dusting off the functional programming brain was much less painful using their
3636
examples and I'm a total sucker for getting tests to pass.
3737
<br><br>
3838
Next was asking for help, something I'm trying to get better at. While the
39-
comiler and documentation is really helpful, sometimes I have to admit that
40-
learning from someone who's been through some of it is really invaluable. The
41-
freeCodeCamp mantra
42-
[Read, Search, (Don’t Be Afraid to) Ask](https://medium.freecodecamp.org/read-search-dont-be-afraid-to-ask-743a23c411b4)
39+
compiler and documentation is really helpful, it's sometimes worth admittinh that
40+
learning from someone who's been through it already is invaluable. The
41+
<a href="https://www.freecodecamp.org/">freeCodeCamp</a> mantra
42+
<a href="https://medium.freecodecamp.org/read-search-dont-be-afraid-to-ask-743a23c411b4">Read, Search, (Don’t Be Afraid to) Ask</a>
4343
has influeced me in that.
44-
I did find some guidance from <a href="https://twitter.com/CrockAgile">@CrockAgile</a>,
45-
a friend who had been through some of the learning process. He helped me a ton in
46-
sorting out the requirements of implementing standalone Elm beyond what I was
47-
albe to glean from toy the first couple <a href="http://exercism.io">exercism.io</a>
44+
<a href="https://twitter.com/CrockAgile">@CrockAgile</a>,
45+
a friend who had been through some of the learning process provided some really great guidance in sorting
46+
out the implementation details I's been unable to glean from the first couple <a href="http://exercism.io">exercism.io</a>
4847
exercises. Things like the following code block that I'm likely to revisit for
49-
every Elm application I write.
48+
any future Elm application I write.
5049

5150
<pre>
5251
<code>type Msg

0 commit comments

Comments
 (0)