from __future__ import *
Mochi Media hiring for Python web developer job in San Francisco
October 06, 2008 at 01:57 PM | categories: SQLAlchemy, PostgreSQL, Pylons, simplejson, python, mochiweb, javascript, Genshi, Mochi Media, subversion, nginx, AJAX, mochibot, MochiKit, SQL, erlang, mochiads | View CommentsI don't often post about open jobs at Mochi Media on my blog, but it seems that most of the awesome people we have here found out about Mochi Media from me so I might as well ;)
Web development at Mochi Media happens primarily in Python and Pylons with Genshi templates. We're currently using mostly MochiKit for the JavaScript heavy lifting and we talk to all of our backend services (which are either Python or Erlang) via JSON. We're using a bunch of other cool technologies such as memcached, nginx, PostgreSQL, etc. We also often contribute a lot of what we do back to the open source community (e.g. MochiKit, MochiWeb, simplejson, etc.) and would love adding some more team members that were interested in helping out with our open source efforts too! We don't require experience with all of these frameworks and tools, we just need smart people that have a really solid understanding of web development in Python.
Mochi Media runs MochiAds, a monetization platform for Flash games, and MochiBot, an analytics service for Flash content... so we've got tons and tons of data to work with and very interesting scale problems to address. Our primary service, MochiAds, is a monetization platform for Flash games... so part of the responsibilities of being a Mochi employee is to approve all the latest in Flash games for paid advertisements from our network ;) There's even an internal competition to see who approves the most games each week! You can check some of them out at http://www.mochiads.com/games/
Mochi Media was founded in 2005 by Jameson Hsu and myself, and we're backed by Accel Partners and Shasta Ventures. We've got a great team and are always looking to add the best people we can find. If you kick ass at Python and love building cool apps for the web, talk to us!
This position is full-time and on-site in San Francisco, CA. We're very easily accessible by BART and Caltrain in SOMA, at 2nd st. and Mission st. More evidence that Mochi Media is a cool place to work can be found on the mochimedia Flickr photostream: http://flickr.com/photos/mochimedia
More info and application instructions are here: http://www.mochimedia.com/about/careers/#webengineer
Ad Serving in Erlang @ CUFP 2008
September 29, 2008 at 01:56 PM | categories: mochiads, mochiweb, erlang, Mochi Media | View CommentsSlides from my Ad Serving in Erlang talk at CUFP 2008 are available here: http://undefined.org/cufp2008/
I had a great time at ICFP and CUFP and it was really inspiring to see what other people are doing with functional programming. I look forward to attending in the future! I think I'll have to write an app in Haskell first though, so I can understand more of the ICFP talks ;)
If you're interested in Erlang I also recommend that you check out my other erlang posts particularly the video and slides from my Exploring Erlang @ C4[1] talk!
Exploring Erlang @ C4[1] video
March 08, 2008 at 08:56 AM | categories: mochiweb, erlang | View CommentsThe video of the Exploring Erlang talk I gave at C4[1] last August is up on the interwebs! It only took seven months :)
- Video:
- http://rentzsch.com/c4/c41VideosAvailable
- Slides and source:
- http://bob.pythonmac.org/archives/2007/08/11/exploring-erlang-c41/
Printing floats with Erlang
December 17, 2007 at 10:37 PM | categories: mochiweb, erlang | View CommentsThe float printing options that ship with Erlang all suck. You either don't have sufficient precision, or you have an extremely verbose representation:
1> io:format("~w ~.18g ~g ~s~n", [0.1234567, 0.1234567, 0.1234567, float_to_list(0.1234567)]).
0.123457 0.123456700000000003 0.123457 1.23456700000000002548e-01
2> io:format("~w ~.18g ~g ~s~n", [0.1, 0.1, 0.1, float_to_list(0.1)]).
0.100000 0.100000000000000006 0.100000 1.00000000000000005551e-01
mochiweb includes an implementation of the algorithm from the "Printing Floating-Point Numbers Quickly and Accurately" paper in the mochinum module (which is standalone, if you just want to use it without the rest of mochiweb):
3> io:format("~s~n", [mochinum:digits(0.1234567)]).
0.1234567
4> io:format("~s~n", [mochinum:digits(0.1)]).
0.1
Problem solved :)
Using the mochiweb project skeleton
December 17, 2007 at 09:06 PM | categories: mochiweb, erlang | View CommentsA bit over a week ago we moved a slightly modified version of our project skeleton into the open source mochiweb repository, which gets you a start shell script, a skeleton application following (most of) the OTP paradigms, a Makefile, and a web server that serves static files out of priv/www.
The first thing you have to do is make sure mochiweb is built:
$ cd ~/src/mochiweb $ make (cd src;make) make[1]: Nothing to be done for `all'.
After that you just run ./scripts/new_mochiweb.erl with the project name and destination (you can put a symlink of that script on your PATH somewhere).
$ ./scripts/new_mochiweb.erl mochidemo ~/src ...
Starting it is easy, just build with make and then run start.sh or start-dev.sh from ~/src/mochidemo. The only difference between the two at the moment is that start-dev.sh will poll for changes in ebin files and purge them automatically when they're updated. The default port is 8000 listening on all IPs and it's configured in src/PROJECT_sup.erl.
$ cd ~/src/mochidemo
$ make
...
$ ./start-dev.sh
...
=PROGRESS REPORT==== 17-Dec-2007::20:58:33 ===
application: mochidemo
started_at: nonode@nohost
1> http:request("http://127.0.0.1:8000/").
...
{ok,{{"HTTP/1.1",200,"OK"},
[{"date","Tue, 18 Dec 2007 04:58:55 GMT"},
{"server","MochiWeb/1.0 (Any of you quaids got a smint?)"},
{"content-length","88"},
{"content-type","text/html"}],
"<html>\n<head>\n<title>It Worked</title>\n</head>\n<body>\nMochiWeb running.\n</body>\n</html>\n"}}
As far as deployment goes, it's a convenience that mochiweb makes a symlink to itself as PROJECT/deps/mochiweb-src so that the start scripts can find it and put them in your code path. You'll probably want to put a full copy of mochiweb in its place, use a svn:external (which is what we do right now), or manage the mochiweb dependency by some other means.
mochiweb - another faster web server
November 07, 2007 at 09:39 PM | categories: mochiweb, erlang | View Commentsmochiweb is finally well on its way to becoming a proper open source project, thanks to Matthew Dempsky. We've got a mochiweb project on google code and a mochiweb group on google groups.
Similarly interesting is that iserve is now turning into something more useful. iserve and mochiweb are pretty much the same thing under the hood, but mochiweb exposes a different API (which I find to be nicer, but I designed it) and supports more of the HTTP protocol. They both (ab)use inets' {packet, http} mode and they're both very minimal.
Here's a mochiweb version of the minimal example that Tobbe gave for iserve:
-module(mochiweb_demo).
-export([mochiweb_request/1, start/1]).
start(Port) ->
mochiweb_http:start([{port, Port}, {loop, {?MODULE, mochiweb_request}}]).
mochiweb_request(Req) ->
Req:ok({"text/html",
<<"<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
<html>
<head><title >Welcome to mochiweb</title></head>
<body>
Hello
</body>
</html>">>}).