mirror of
https://github.com/bspeice/speice.io
synced 2024-12-22 16:48:10 -05:00
1 line
21 KiB
JavaScript
1 line
21 KiB
JavaScript
|
"use strict";(self.webpackChunkspeice_io=self.webpackChunkspeice_io||[]).push([["7624"],{53570:function(e,t,n){n.r(t),n.d(t,{assets:function(){return l},contentTitle:function(){return a},default:function(){return d},frontMatter:function(){return i},metadata:function(){return s},toc:function(){return h}});var s=n(10510),o=n(85893),r=n(50065);let i={slug:"2016/10/rustic-repodcasting",title:"A Rustic re-podcasting server",date:new Date("2016-10-22T12:00:00.000Z"),authors:["bspeice"],tags:[]},a=void 0,l={authorsImageUrls:[void 0]},h=[{value:"The Setup",id:"the-setup",level:2},{value:"Issue 1: Strings",id:"issue-1-strings",level:2},{value:"Issue 2: Fighting with the borrow checker",id:"issue-2-fighting-with-the-borrow-checker",level:2},{value:"Conclusion",id:"conclusion",level:2}];function c(e){let t={a:"a",blockquote:"blockquote",code:"code",em:"em",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,r.a)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.p,{children:"Learning Rust by fire (it sounds better than learning by corrosion)"}),"\n",(0,o.jsxs)(t.p,{children:["I listen to a lot of Drum and Bass music, because it's beautiful music. And\nthere's a particular site, ",(0,o.jsx)(t.a,{href:"http://bassdrive.com/",children:"Bassdrive.com"})," that hosts\na lot of great content. Specifically, the\n",(0,o.jsx)(t.a,{href:"http://archives.bassdrivearchive.com/",children:"archives"})," section of the site has a\nlist of the past shows that you can download and listen to. The issue is, it's\njust a ",(0,o.jsx)(t.a,{href:"http://archives.bassdrivearchive.com/6%20-%20Saturday/Electronic%20Warfare%20-%20The%20Overfiend/",children:"giant list of links to download"}),". I'd really like\nthis in a podcast format to take with me on the road, etc."]}),"\n",(0,o.jsxs)(t.p,{children:["So I wrote the ",(0,o.jsx)(t.a,{href:"https://github.com/bspeice/elektricity",children:"elektricity"})," web\napplication to actually accomplish all that. Whenever you request a feed, it\ngoes out to Bassdrive, processes all the links on a page, and serves up some\nfresh, tasty RSS to satisfy your ears. I hosted it on Heroku using the free\ntier because it's really not resource-intensive at all."]}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.strong,{children:"The issue so far"})," is that I keep running out of free tier hours during a\nmonth because my podcasting application likes to have a server scan for new\nepisodes constantly. Not sure why it's doing that, but I don't have a whole\nlot of control over it. It's a phenomenal application otherwise."]}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.strong,{children:"My (over-engineered) solution"}),": Re-write the application using the\n",(0,o.jsx)(t.a,{href:"https://www.rust-lang.org/en-US/",children:"Rust"})," programming language. I'd like to run\nthis on a small hacker board I own, and doing this in Rust would allow me to\neasily cross-compile it. Plus, I've been very interested in the Rust language\nfor a while and this would be a great opportunity to really learn it well.\nThe code is available ",(0,o.jsx)(t.a,{href:"https://github.com/bspeice/nutone",children:"here"})," as development\nprogresses."]}),"\n",(0,o.jsx)(t.h2,{id:"the-setup",children:"The Setup"}),"\n",(0,o.jsxs)(t.p,{children:["We'll be using the ",(0,o.jsx)(t.a,{href:"http://ironframework.io/",children:"iron"})," library to handle the\nserver, and ",(0,o.jsx)(t.a,{href:"http://hyper.rs/",children:"hyper"})," to fetch the data we need from elsewhere\non the interwebs. ",(0,o.jsx)(t.a,{href:"http://doc.servo.org/html5ever/index.html",children:"HTML5Ever"})," allows\nus to ingest the content that will be coming from Bassdrive, and finally,\noutput is done with ",(0,o.jsx)(t.a,{href:"http://sunng87.github.io/handlebars-rust/handlebars/index.html",children:"handlebars-rust"}),"."]}),"\n",(0,o.jsx)(t.p,{children:"It will ultimately be interesting to see how much more work must be done to\nactually get this working over another language like Python. Coming from a\ndynamic state of mind it's super easy to just chain s
|