17 6 / 2013

Dependencies can be declared using cpanfile and frozen with carton install. The buildpack will install these dependencies using Carton into a cached ./local directory.

I implemented the experimental buildpack update to enable Carton and perl versions support.

This enables the use of Carton (dev release on v0.9) to deploy dependencies recorded in carton.lock (you have to check it in to the git repo), and then use the file .perl-version ala plenv to specify the perl runtime version. Only the latest minor point release of all stable releases are supported. See the README for details.

This has been one of my TODOs to make this buildpack actually usable on Heroku, since otherwise a) installation will use the latest cpan modules from CPAN unless you explicitly specify version in cpanfile (which is great) and b) the perl used to run your application is always /usr/bin/perl version 5.10 that comes with whatever OS that runs on Heroku.

I tried to use vulcan to build binaries on Heroku, but it looks a little complicated and requires setting up Heroku addons. I went with the simplest technique to run perl-build on heroku run bash like explained in this article, then scp back the resulting binary to my host.

This makes the perl buildpack runs more like other languages buildpack like Ruby and NodeJS.

Note that I consider this a beta, and you have to specify the git branch #carton in the buildpack URL to use it.

The initial deployment takes a little while to copy vendor perl, then bootstrap all dependencies for carton - which i hope can be eliminated once carton goes 1.0 and support fatpacked executable.

Thanks to @judofyr for his also excellent perloku buildpack that i shamelessly copied the technique to build & download perl binaries.

12 6 / 2013

This eliminates the XS dependency in Plack.

Plack-1.0026-TRIAL is on CPAN, which is a big release that eliminated a dependency for the big LWP module.

LWP not only has a big chain of dependencies since the distribution split earlier, it also has XS dependency (HTML::Parser) in the chain, which makes Plack code non-trivial to install on environments without a C compiler, and makes fatpacking difficult (although realistically, these C bits are only necessary for testing and not required mostly on the runtime).

This is a big shift - I made LWP optional in #408 but also replaced the use of LWP with HTTP::Tiny in #410 - so that Plack::Test::Suite (reference Test suite for PSGI handlers) and ::Server (Plack::Test implementation to run tests through live server) now uses HTTP::Tiny instead of LWP. The test interface is still the same, and you can use HTTP::Request/Response interface for that, which is a much smaller subset of LWP.

I tested various distributions where it implicitly expects LWP when depending on Plack, and fixed a lot of them, and sent pull requests where needed. Please test Plack-1.0026-TRIAL against your application/frameworks/server implementations.

cpanm --dev Plack

Permalink 2 notes

11 6 / 2013

Podcast streaming howto

WWDC podcast としては日本最速(たぶん)のepisode 13 で3度めになった ライブ配信 について簡単に解説。

先日 RubyKaigi なんかでいろんな人から「Podcast 聴いてます!」といってもらえたのはうれしかったんですが、ある人から「どこで録音してるんですか?」と聞かれました。「家ですね」と答えたら、「え、じゃあゲストの人を家に呼んでるんですか?」と返ってきたのはちょっとおもしろかったです。

配信・録音は Skype でやっています。日米で離れていることもよくあって、スケジューリングが割りと大変。収録自体は Skype Call Recorder などでそのまま録音もできます(実際自分の声はこれで録音しています)が、クオリティを上げるためにローカルでも録音したものをマージしています。この辺の話は Podcast Recording and Editing に書きました。

で、ライブ配信をするにあたって、単に Skype 上で流れている音を配信するなら Soundflower, Line-In, Garage Band なんかを駆使すれば できそうです。が、

  • Skype と配信で(ただでさえ細い)自宅の帯域を占有したくない
  • 複数の重いアプリを立ち上げてCPUを駆使したくない。ファンが回るとマイクで拾ってしまうこともある

という理由から、別途配信用のマシンを日本に用意しています。用意しています、といってもすでにテレビ録画などに使っているMac miniマシンが日本にあるので、これを使ってます。

配信用の Skype bot アカウントを作成し、実際に収録時にボイスチャットに参加させます。contact オンリーにしておいて、自動でaccept するようにしておくと便利ですね。操作は LogMeIn から。

Skype 側では、流れてくる音を Soundflower (2ch) にルーティングします。もし自分のSkype でやるとなると、自分の声を Line In などでミックスする必要がでてきますが、これは bot で聴く専門なので、必要なし。

あとは配信用のアプリに Soundflower 2ch を入力として入れればOK。ライブ配信に使っている Mixlr では入力ソースをカスタマイズできるので、ここで選択すればOK。配信スケジュールの設定や iOS アプリからの視聴からもできていいですね。

ライブページ に使っている埋め込みウィジェットは有料会員のみのようですが、同様の他サービスに比べてリーズナブルなので、とりあえず有料にしてみています。

ライブ配信のスケジュールはだいぶ不定期ですが、iCal フィード を google calendar 上に用意したので、リアルタイムにツッコミを入れたい、という場合にはこちらも利用してみてください。

Permalink 7 notes

11 6 / 2013

bulknews-podcast:

収録時間 46:55 | Download MP3 (26MB)

Kenn Ejima さん (@kenn), Hakuro Matsuda さん (@hak) を迎えて、Apple WWDC 2013 Keynote, iOS 7, OS X Mavericks, Mac Pro, Macbook Air などについて話しました。

3人収録にも慣れてきたこの頃、おなじみの kenn と、hakuro さんを迎えて WWDC 話です。収録ではさらっと流しているというか触れてもいませんが、hakuro さんは元 Apple で iOS のエンジニアリングをしていたこともあり、なかなか濃い話ができました。

ちなみにゲスト2人の場合、個人的には話すネタに困ることが少ないので事前の準備は楽だったりしますね。オーディオ漏れが起こりやすかったり、ぶつかることも結構あるので 編集が割と大変 だったりしますが、だいたい収録時間 x 3 ぐらいで作業できるようになってきました。

Permalink 10 notes

28 5 / 2013

I want to take a moment to discuss what this means, why I suggested it, and what I think Module::Build trail blazed for Perl 5.

Great post (as always) by David Golden about what Module::Build pioneered since 2001 to make the Perl toolchain ecosystem better.

Few things to add:

So… the biggest impact on end-users will be that when Perl 5 version 20 is released in Q2 2014, people will have to install Module::Build from CPAN to squelch the deprecation warning.

This is usually automatic, since major CPAN clients figure out whether the module loaded from perl core lib dir is marked deprecated, and in that case it automatically reinstalls it from CPAN, and the deprecation warning will go away.

If you had a subclass to do one thing and I had a subclass that did something else and you wanted to combine them, you pretty much had to copy and paste code.

I should point out there’s a work to combat this problem: Module::Build::Pluggable by tokuhirom. But I should also note that tokuhirom and I eventually agreed that most of the authoring side work should be done by the author tools, hence we are now working on Milla and Minilla - it’s no coincidence we have similar names.

27 5 / 2013

bulknews-podcast:

牧大輔さん (@lestrrat), Tokuhiro Matsuno さん (@tokuhirom) を迎えて、Perl 5.18, YAPC::Asia などについて話しました。

Permalink 6 notes

17 5 / 2013

bulknews-podcast:

収録時間 46:22 | Download MP3 (26MB)

Kenn Ejima さん (@kenn), Motohiro Takayama さん (@mootoh) を迎えて、Google I/O, Google Glass, Google Play Game Services などについて話しました。

番組へのフィードバックは Twitter にて @miyagawa またはハッシュタグ #bulknews にてお寄せください。

Show Notes

2週間で3エピソードとちょっと飛ばし気味ですが、時事ネタということでGoogle I/O 話。翌日でキーノートちょっと忘れてますが、参加してたmootohさんのおかげでいろいろ拾えましたね。後半の Game Services 話は業界トークっぽくて面白かったです。

録音しながらライブストリーミングもしてみたんですが、時間帯の関係もあってフィードバックをもらうのが難しかったですね。twitter 以外にも Lingr とかのほうがエンゲージしやすいのかな。いろいろ試行錯誤してみる必要ありですね。

Permalink 11 notes

17 5 / 2013

Podcast recording and editing

Here’s what it looks like when it comes to editing my (semi-badly recorded) Podcast episodes.

When I first heard 5by5/Mule’s podcasts, i was really impressed by the audio quality of their shows, since like many of you, i had a feeling that “Podcast is by amateurs and audio is mediocre at best”. I was blown away.

So I did a little bit of research before starting my show, because I wanted to make it sound good too. Jason Snell’s article on MacWorld explains the current method of my recording.

Skype, Everyone Records, GarageBand

The tl;dr for that is, I use Skype Call Recorder to record both my audio and guest(s) on Skype, on separate tracks. It’s great that it records my audio locally, not via Skype, so it’s a direct input from my Mic.

I ask guests to record their local audio using QuickTime too and send files after recording. Then I synchronize them with Skype’s recorded audio, then discard the Skype audio file.

Now I get everyone’s locally recorded audio, on separate tracks on GarageBand, and I only need to edit when there’re murmuring or conflicts, etc. In Theory.

I’m often asked how long it takes to edit the show - if the show is one hour, it usually takes 2 to 3 hours.

Microphone and Headphones

Recent episodes needed a little bit more of my editing work than previously - this is not to particularly blame anyone but the technologies/hardware, because it’s a mere audio leak on other’s ends.

Basically when I speak, my voice leaks on the guest’s track because their mic picks up the audio from the earpiece, and makes an echo/delay sound effect that I need to cancel out. That leads to the chaotic GarageBand editing shown earlier. Noise gate works to cancel that, but it also cancels the valid voice and i avoid doing it.

I ask everyone to use headphone/earphone, but sometimes the microphone is too close to them, or the headphone is not solid enough and leak audio from there. It doesn’t seem to happen to everyone (which is good), so it should definitely be related to the combination/setup of the microphone and headphones.

My particular setup is Blue Yeti USB Microphone and Klipsch IMAGE S4 and don’t have that problem on my end. Klipsch has a very crisp sound with very little sound leak, as an in-ear headphone.

In terms of not leaking audio, Over-the-ear Headphones should be the best, but unless you have a microphone with monitoring capabilities (like Yeti :D), it might be difficult to hear what you speak while speaking.

I guess this is one of the difficulties of doing the show with irregular guests, since we can’t ask guests to invest some money on microphones/headphones, which I would if I do recurring/fixed guests :)

Tips

Here’s a simple thing: don’t use Apple’s iPhone headset. Its audio isn’t bad, but it picks up a lot from its earpiece, and makes a big noise when touched with your clothes. Speaking of Apple, Macbook Pro Retina’s dual USB microphone is fantastic, assuming you don’t have a big ambient noise.

Also, some of the Japanese podcast shows I listen to have severe audio quality issues (although I’m not sure if they read this in English ;p) - Just don’t record the show in a cafe/restaurant with big ambient noise. Also, double your bitrate and make a mono MP3, rather than low bitrate stereo files.

Anyway this was my current setup. For the latest episode 11 where we talked about Google I/O, we also experimented with the live streaming with Mixlr. I will explain the setup about it (pretty simple if you have a spare Mac mini) later if you’re interested :)

12 5 / 2013

bulknews-podcast:

Kenta Murataさん (@mrkn), Ryo Nakamuraさん (@r7kamura) を迎えて、RailsConf, Ruby 2.0, Rails 4, Chanko 2.0, RubyKaigi, YAPC などについて話しました。

今週は日本語営業に戻って、mrkn, r7akamura とRuby 話をしました。ちなみに3人の収録だと間が持ちやすくていいんですが、編集がちょっと大変。

Rails 2.3 is Kansas

DHH の Kansas ネタはConfreaksにKeynoteが上がってました。13分あたり。hkmurakami さんが 詳しく解説 してくれてます。日本の2ch でよくでる群馬県ネタ に近いものがありますね。

Permalink 9 notes

08 5 / 2013

bulknews-podcast:

On the episode 9 of my podcast, featuring Jesse Vincent (@obra), we discussed his recent experiments to build his own keyboard.

Some of my followers on Twitter and friends on Facebook asked if there was any plan for an English episode of my podcast.

So here it is, with Jesse Vincent, we talked about his recent exploration of making his own Keyboard. We also discussed little bit about perl, and OSDC.TW, the conference we just attended a couple of weeks ago.

Might want to do more of English episodes in the future, but comments and feedback is always appreciated.

Permalink 8 notes