News for hackers. Stuff that matters.
Re:Zed Shaw: Tir Web Framework Officially Up by mikeryan on Friday December 03, 2010 @05:39PM (#1967727)
So in 2010 Zed has written his own web server which runs his new framework he wrote for the new webapp he wrote.

What did you do this year?

Re:Zed Shaw: Tir Web Framework Officially Up by angelbob on Friday December 03, 2010 @06:13PM (#1967812)
In 2010? I reworked my Comet-based realtime game-in-a-web-server library, RailsGame.

I fully rewrote, updated and released a webapp called WantMyJob.com.

I wrote a circuit simulator game called Shanna's Pizza to start teaching my two-year-old the basics of programming. I also started doing Snap Circuits with her so she'd have a physical basis to understand the circuit simulator game. Also, had a second kid.

I wrote a Rails 3 tutorial, including an app with logins and nested resources, called RefactorIt!

I finally put together a real programming portfolio, on the web and everything (angelbob.com/portfolio).

I read up on Bayesian Statistics and Data Analysis (thanks, O'Reilly!).

I blogged and blogged and blogged.

I reworked, resurrected and took screen shots of a scary amount of my old work, partly for the portfolio. This sort of blurs with converting my old Rails stuff to Rails 3, but I did some of both.

I continued to work on my day job, of course. And gave a JRuby presentation for Engine Yard based on what we do there.

Did you know you get more done if you write it down somewhere (like a blog and portfolio) and tell people about it? True story.

That's probably part of Zed's trick, too.

Re:Zed Shaw: Tir Web Framework Officially Up by srbloom on Friday December 03, 2010 @06:40PM (#1967866)
Don't forget "answered a rhetorical question".
Re:Zed Shaw: Tir Web Framework Officially Up by zedshaw on Friday December 03, 2010 @10:44PM (#1968409)
That's pretty cool stuff man. I like people who go out of their way to do as much diverse stuff as they can.
Re:Zed Shaw: Tir Web Framework Officially Up by citricsquid on Friday December 03, 2010 @07:36PM (#1967979)
Did you know you get more done if you write it down somewhere (like a blog and portfolio) and tell people about it? True story.

Do you find that? I'm the opposite, once I "announce" something all desire and motivation for completion goes out of the window. For me I think it's about the appreciation, so when I explain the idea and love it, why complete it.

Re:Zed Shaw: Tir Web Framework Officially Up by zedshaw on Friday December 03, 2010 @10:46PM (#1968414)
It varies for me. Sometimes it's just an idea and I want to share it. Maybe I'll never do it, maybe I want to get feedback on it. Some pretty cool stuff came out of just "What-If" like Mongrel2 and Librelist.

Other times I get infected with an idea and have to crank out a prototype to see if it'd work. When I'm done, I still try to throw it up there and see what people think. Usually the process of writing about it actually helps me work out if it's worth it or not as well.

Re:Zed Shaw: Tir Web Framework Officially Up by technoweenie on Saturday December 04, 2010 @11:04AM (#1969446)
Don't get addicted to Brain Crack: http://www.youtube.com/watch?v=24prm3XjVgk
Re:Zed Shaw: Tir Web Framework Officially Up by angelbob on Saturday December 04, 2010 @01:13AM (#1968676)
I build first, then announce :-)
Re:Zed Shaw: Tir Web Framework Officially Up by clyfe on Friday December 03, 2010 @06:31PM (#1967850)
Indeed writing and interacting about something levels you up. I'm not (yet) a blogger but recently I have started interacting on a few social coding networks (stackoverflow, github, HN) and I feel more productive.

PS. Is RailsGame open source ? It looks interesting!

Re:Zed Shaw: Tir Web Framework Officially Up by clyfe on Friday December 03, 2010 @06:33PM (#1967852)
nvm, found it on your github account https://github.com/noahgibbs/RailsGame
Re:Zed Shaw: Tir Web Framework Officially Up by jrockway on Friday December 03, 2010 @07:13PM (#1967945)
I wrote a rant about how much I hate people that kick back and put their feet up on the table.

Oh, nope, that was Zed, too!

(But seriously, Mongrel 2 is an amazing work of software engineering. In addition to being a good web server, it's also a good example of how nice C is if you forget how they did it in the 70s and write it like it's 2010.)

Re:Zed Shaw: Tir Web Framework Officially Up by chunkbot on Friday December 03, 2010 @09:52PM (#1968306)
They did Unix in the 70s; C was pretty nice then too.
Re:Zed Shaw: Tir Web Framework Officially Up by jrockway on Saturday December 04, 2010 @02:25AM (#1968788)
Oh yeah, it was great! Instead of "su", you just ran finger with a really long command-line.
Re:Zed Shaw: Tir Web Framework Officially Up by zedshaw on Friday December 03, 2010 @11:11PM (#1968480)
Yep, 'cause pointing your nasty dogs at someone is just low class. (ha)
Re:Zed Shaw: Tir Web Framework Officially Up by timtadh on Saturday December 04, 2010 @12:03AM (#1968545)
Wrote my own web server. Which runs my own web framework. Which runs my new webapp a friend and I wrote yesterday. Writing a simple web stack isn't hard. Writing a full featured, secure, and reliable stack is more difficult.

I mean we are mostly all people who make stuff here. I am slightly offended by your attitude that ZS is some how showing us up and we need to prove what we did this year.

Re:Zed Shaw: Tir Web Framework Officially Up by axod on Saturday December 04, 2010 @09:39AM (#1969280)
Agree. Anyone can write a webserver in a day. It's all the extra crap that takes a while to get just right.

The hero worship really puts me off checking HN.

Re:Zed Shaw: Tir Web Framework Officially Up by simonw on Saturday December 04, 2010 @02:27AM (#1968794)
Launched wildlifenearyou.com, built a new commenting system for guardian.co.uk (with a great team), ran a marathon, got married, went on a six month honeymoon through France, Spain, Morocco and Egypt, co-founded and launched lanyrd.com with my wife (from an apartment in Casablanca), learnt to scuba dive, and we're now on a self-drive safari in South Africa. 2010 has been /awesome/.
Re:Zed Shaw: Tir Web Framework Officially Up by steerpike on Sunday December 05, 2010 @07:20PM (#1973247)
Hey, I understand the guardian comment system uses Pluck and we're looking to integrate pluck ourselves at the ABC in Australia. I don't suppose I could pick your brains for any kind of implementation tricks and information you can provide can I?
Re:Zed Shaw: Tir Web Framework Officially Up by Swannie on Monday December 06, 2010 @08:49PM (#1977672)
You say "got married" = hosted a fantastic wedding, complete with huge conga lines, traditional Jewish chair dance, a wedding "cake" of cheese, otters, owls, eagles, and more!
Re:Zed Shaw: Tir Web Framework Officially Up by pistoriusp on Saturday December 04, 2010 @09:04AM (#1969219)
Want to grab a beer?
Re:Zed Shaw: Tir Web Framework Officially Up by mwhooker on Friday December 03, 2010 @06:11PM (#1967809)
don't forget writing a book on python
Re:Zed Shaw: Tir Web Framework Officially Up by kmfrk on Saturday December 04, 2010 @01:47PM (#1969850)
And a great one at that.
Re:Zed Shaw: Tir Web Framework Officially Up by endtime on Friday December 03, 2010 @09:53PM (#1968309)
Since we're all bragging, I finished my MSCS at Stanford with over a 4.0 GPA, wrote a game that was a finalist in the CS248 competition, had my first paper published, TAed CS210, launched my startup, learned Django and CoffeeScript and JavaScript, wrote a charting library in CS/Raphael, started learning how to be someone's boss, and moved across the country and forced myself to make friends. All in all I feel good about the year.
Re:Zed Shaw: Tir Web Framework Officially Up by zedshaw on Friday December 03, 2010 @10:48PM (#1968418)
Over a 4.0 GPA? Man, are grades that badly inflated now that they have to add extra points to the GPA to make people seem better? No knock on you at all, but just curious what the scale is.
Re:Zed Shaw: Tir Web Framework Officially Up by ced on Friday December 03, 2010 @11:02PM (#1968456)
At my uni (University of Montreal), A was worth 4.0 and A+ was worth 4.3. I don't think it comes from grade inflation, though. Just a different convention.

According to Wikipedia, the 4.0 scale is anything but standard. http://en.wikipedia.org/wiki/Grade_(education)

Re:Zed Shaw: Tir Web Framework Officially Up by endtime on Saturday December 04, 2010 @01:45PM (#1969847)
Well, an A+ is worth 4.3, so if you're some kind of superhuman I suppose you could get a 4.3 overall, though it's not really practical when you're taking 3 classes a quarter and being a TA or RA. I managed to get three of those, and honestly I think I earned them - I worked extremely hard throughout my MS and that occasionally resulted in very strong results. There are some classes with inflation-compatible grading schemes (Pat Hanrahan's 148 comes to mind, in which, when I took it, 7/8 projects offered 25% extra credit each, and each project was 10% of one's grade, meaning the maximum grade for the course was 117.5%...though I didn't get an A+ in that course, since I didn't do well on the exams), but they're the minority.
Re:Zed Shaw: Tir Web Framework Officially Up by steveklabnik on Friday December 03, 2010 @11:58PM (#1968536)
I graduated my high school with a 4.7. They add in the 'bonus points' for taking AP and honors classes after the division, not before.

Oh, and everyone over a 4.0 was reported as valedictorian.

Re:Zed Shaw: Tir Web Framework Officially Up by wahnfrieden on Saturday December 04, 2010 @12:34AM (#1968614)
The problem is, without knowing the cap on "bonus points," I can't know how far under 4.0 your GPA might have been without the bonus. Maybe your GPA was "only" a 3.7 before adding 1 bonus point? It's ambiguous at best, deceptive at worst.
Re:Zed Shaw: Tir Web Framework Officially Up by grandalf on Saturday December 04, 2010 @12:58AM (#1968651)
On the other hand, if a school doesn't give extra points for more advanced classes, someone who took the hardest curriculum possible and did pretty well might have a lower GPA than someone who took the easiest curriculum possible.
Re:Zed Shaw: Tir Web Framework Officially Up by steveklabnik on Saturday December 04, 2010 @01:40AM (#1968725)
This happened to one of my friends.
Re:Zed Shaw: Tir Web Framework Officially Up by steveklabnik on Saturday December 04, 2010 @01:41AM (#1968727)
It was possible to get a 4.9. I don't remember exactly what I got, but it was mostly As, a few Bs.

They've since decreased the 'bonus' quite a lot.

Re:Zed Shaw: Tir Web Framework Officially Up by mikeryan on Saturday December 04, 2010 @12:37AM (#1968620)
We weren't all bragging
Re:Zed Shaw: Tir Web Framework Officially Up by _b8r0 on Monday December 06, 2010 @07:13PM (#1977424)
* Kicked out more bad guys out of compromised networks than usual.

* Grew my main business, had our first year where I've not had a single worry about running out of money (touch wood) in the middle of a serious recession.

* Started building academic and vendor relationships (never thought I'd do that) to develop new technologies and services.

* Did more vulnerability research this year than I have in the last two but haven't published anything public yet.

* Moved to Sales, Marketing, now back to Technical for the time being.

* Took on a business partner and mentor

* Bid for two research grants

* Built up pipeline, wrote more proposals than I have in a long time.

* Seriously damaged my knee in a freak dancing accident.

* Grew a Mo to support Prostate Cancer charities (and raised a few bob too)

* Started a proper non-security side project (http://www.minklinks.com/) - failed to get it into beta for HN November but it will be out before year end.

* Did a whole load of pentesting.

That's it so far, still more things to come before year end though. Hope I pull them off.

Re:Zed Shaw: Tir Web Framework Officially Up by didip on Saturday December 04, 2010 @12:51AM (#1968637)
Let's see,

* I quit my full time job, start doing contracting again.

* I co-founded http://cooln.es to test our theory about points relationships between social sites.

* I founded http://mybucket.co because all other bookmarking apps are too much work.

* manual classification of news is too much work, so I created Bayesian filter on top of Redis. It's open source: https://github.com/didip/bayes_on_redis

* I'm still helping out Python newcomers on Pylons, Tornado, and recently Flask mailing list.

* I fix bugs on a couple of gems.

* I start blogging again.

* I start learning http://keplerproject.github.com/orbit not too long ago after answering my own question "I wish there's a hybrid between ruby+python and faster than both."

I'd say it hasn't been a bad year.

Re:Zed Shaw: Tir Web Framework Officially Up by bluesnowmonkey on Friday December 03, 2010 @09:41PM (#1968278)
Well, I made a new cloud computing platform using my new federated REST database and my new message queue and my new Subversion sharding layer and my new unit testing library, all in a language I didn't know when I started. Then I made a web site and management console for it that runs on it. And a network API and a command-line tool because you need those.
Re:Zed Shaw: Tir Web Framework Officially Up by pistoriusp on Saturday December 04, 2010 @09:04AM (#1969221)
It's a fair question, but I think that comparing yourself to others success is a great way to make yourself feel bad.
Re:Zed Shaw: Tir Web Framework Officially Up by mmastrac on Friday December 03, 2010 @05:14PM (#1967646)
I love the natural style of page conversation on the example page. As a Java developer, I wish that this style were possible on the servlet platform:

  local login_page = Tir.view("login.html")
  local login_form = Tir.form { 'login_name', 'password'}

  local function login(web, req)
    local params = login_form:parse(req)

    repeat
        params = web:prompt(login_page {form=params, logged_in=false})
    until login_form:valid(params)
    
    return web:redirect('/')
  end

  Tir.start {route='/Login', main=login}
Also, +1 to this: "the framework creator shouldn't be shoving stateful/stateless dogma in your face".
Re:Zed Shaw: Tir Web Framework Officially Up by zedshaw on Friday December 03, 2010 @10:53PM (#1968433)
The natural style is sweet for things like that. I did the Hype.la signup process with natural style and it meant I didn't have to touch the database the whole time. If they quit half-way through then no DB junk left over.

Where this kind of coroutine stuff sucks though is in anything that's "RESTy". In other parts of Hype.la I had simple Xhr callbacks that just grabbed lists of data, so the coroutines were just annoyingly in the way and half the time they were just a big loop with an if-statement for the URLs.

That's where the evented came in. In that way I just map actions to callbacks and done.

Then I ran into a few simple things that didn't work in evented and were still stateless, like the search interface, and so I use the stateless handler for that. Nice and snappy with no extra junk.

Another advantage of all this is that, if you have a part of your app that needs to be resistant to restarts, then you can craft it evented or stateless. In other parts, restarts aren't a big deal so you can do natural. And since everything is just a bunch of little processes, it scales out nice and doesn't have as much of the "gotta-copy-the-world-for-users" that Seaside upgrades do.

Re:Zed Shaw: Tir Web Framework Officially Up by viraptor on Friday December 03, 2010 @06:05PM (#1967795)
This one really surprised me: "Finally, there's not much for deployment. I run my apps in GNU screen and that's about it." Seriously? Is he that lucky, serves that little traffic, or does he run with redundant power, network, server and 24/7 monitoring in an inaccessible bunker?

I haven't been able to run even my toy web apps without something like monit - due to both things under my control and outside of it.

Re:Zed Shaw: Tir Web Framework Officially Up by zedshaw on Friday December 03, 2010 @10:55PM (#1968442)
Hype.la is the only real Tir app, with the Mongrel2 BBS demo being a "proto-Tir" app. There's hardly anyone on it yet since I didn't really "launch" it. Because of that, I just run it in screen and I'll worry about the deployment scenario later. Also, the Tir start command actually works kind of like a little monit/daemontools, so if a handler dies it gets restarted. It's pretty robust already.

And yeah I need some monit soon, but so far it's been running fine for the small scale.

Re:Zed Shaw: Tir Web Framework Officially Up by buro9 on Friday December 03, 2010 @06:24PM (#1967839)
On my hobby projects I run stuff in screen, I haven't had a problem and my server uptime is currently above 200 days. Is it being used? Something like 1,000 concurrent users for most of the day, so yes.

I regarded this as cowboy, but as it worked for me I haven't needed to re-visit it.

Re:Zed Shaw: Tir Web Framework Officially Up by aaronblohowiak on Friday December 03, 2010 @07:18PM (#1967954)
It is cowboy, but there is a time and place for that. If you did this in a large organization, you'd be putting the team at risk. Since it is just you, well, do what you find prudent.
Re:Zed Shaw: Tir Web Framework Officially Up by meric on Friday December 03, 2010 @10:54PM (#1968438)
Last time this was posted I was really interested in it. So interested in fact, I built a django-style template library to go with it because I really liked 'extends' and 'block'.

Github https://github.com/meric/tier/

Example https://github.com/meric/tier/blob/master/main.lua http://pastehtml.com/view/1c26ovp.html

Zed would think this is contradicting the point of Tir, though; it being a micro-framework. =\

Re:Zed Shaw: Tir Web Framework Officially Up by zedshaw on Friday December 03, 2010 @11:01PM (#1968453)
Interesting, I'll take a look at this some more. My only question is, isn't plain old Lua already like django's templates. What specifically are you adding that embedded lua doesn't just give you?
Re:Zed Shaw: Tir Web Framework Officially Up by meric on Friday December 03, 2010 @11:18PM (#1968494)
Template inheritance. See http://docs.djangoproject.com/en/dev/topics/templates/#id1

  `Template inheritance¶
  The most powerful -- and thus the most complex -- part of 
  Django's template engine is template inheritance. Template 
  inheritance allows you to build a base "skeleton" template 
  that contains all the common elements of your site and 
  defines blocks that child templates can override.`
Having made it in lua myself, I can tell you it is indeed quite complex. ;)

The lua template only has "include" (i.e. copying another template into this template), but not "extends", (i.e. use another template as a skeleton and this template only provides details on how to fill it).

Re:Zed Shaw: Tir Web Framework Officially Up by zedshaw on Saturday December 04, 2010 @02:13AM (#1968775)
Well, I only did what I needed, but since Lua's included code blocks are also functional, wouldn't it be easier to just allow passing arguments? It'd also make a lot more sense. I find Django/Jinja inheritance concepts really confusing.

I'll take a look at the code and see what I can come up with.

Re:Zed Shaw: Tir Web Framework Officially Up by meric on Saturday December 04, 2010 @05:10AM (#1968960)
If you wanted, say, your about page to have an extra image next to the logo (as an exception to all the other pages), then you'd have to rewrite another header file to include, whereas if you used template inheritance you could just override that logo part without having another almost identical header file.

It may be confusing if you're new to it... but so are OOP, Lambda calculus, and others. ;)

EDIT: The code isn't that clean... Apologies in advance.

Re:Zed Shaw: Tir Web Framework Officially Up by grandalf on Saturday December 04, 2010 @01:00AM (#1968654)
this is awesome, feel like writing it for ruby too?
Re:Zed Shaw: Tir Web Framework Officially Up by start_something on Saturday December 04, 2010 @01:42PM (#1969839)
Check out DRYML from the Hobo project (hobocentral.net). You build taglibs that can be used and overridden however you like.
Re:Zed Shaw: Tir Web Framework Officially Up by meric on Saturday December 04, 2010 @01:12AM (#1968672)
I don't know ruby... but RoR is an established platform, I would think it would have something similar?
Re:Zed Shaw: Tir Web Framework Officially Up by grandalf on Saturday December 04, 2010 @03:46AM (#1968881)
Not with the same notion of inheritance that django templates have (with multiple blocks that can be overridden in child classes). There is one project someone attempted but never finished.
Re:Zed Shaw: Tir Web Framework Officially Up by btucker on Saturday December 04, 2010 @11:26AM (#1969517)
Isn't this just content_for/yield(:sym)? Or are you talking about something else? http://api.rubyonrails.org/classes/ActionView/Helpers/Captur...
Re:Zed Shaw: Tir Web Framework Officially Up by grandalf on Saturday December 04, 2010 @05:53PM (#1970388)
That's close. Nowhere near as elegant as Django templates though, in my opinion.
Re:Zed Shaw: Tir Web Framework Officially Up by samd on Friday December 03, 2010 @07:01PM (#1967921)

   -------------- NO TESTS ----------------
     You must work at a startup.
Brilliant.

Hype.la is also pretty slick. Maybe it will become the blogroll of open-source projects.

Re:Zed Shaw: Tir Web Framework Officially Up by zedshaw on Friday December 03, 2010 @10:58PM (#1968449)
Ha, yeah I had to put that in. I find working in the valley is kind of like working with a bunch of guys before Knuth and Dijkstra established structured programming. It's like they say, "Yo, I don't do if-statements man. I use gotos only. That logic and structure crap just slows me down and busts up my creative chi."

As for hype.la, stay tuned. I gotta fix up the ad blocks and improve the UI a bunch, but I'm really aiming for it to be for FLOSS and other artists to do ads without feeling like sleeze. Definitely something I want.

Re:Zed Shaw: Tir Web Framework Officially Up by jcromartie on Friday December 03, 2010 @05:18PM (#1967665)
Very cool. I was just looking for other Seaside-style web frameworks today. The "natural style" mode in Tir is just like the main way to build web apps in Seaside.

Aside from Lua and Smalltalk, what other languages could host this kind of framework? I know Ruby 1.9 has Wee, but that doesn't seem to be "ready for prime time."

Re:Zed Shaw: Tir Web Framework Officially Up by vito on Friday December 03, 2010 @05:53PM (#1967765)
I've been toying with something similar in Atomo (running atop mongrel2): http://bitbucket.org/alex/web/src/2a90b9bd6322/example.atomo

In its early stages it was continuation-based, but now it's just regular ol' closures. You can still use continuations rather easily though; some of it is modeled on the PLT stack (send/suspend, etc.).

Earlier progress: https://gist.github.com/717381/433d743dc4a7d91705692ff1dc6ca...

Source code: http://bitbucket.org/alex/web/src

Re:Zed Shaw: Tir Web Framework Officially Up by Ixiaus on Friday December 03, 2010 @08:03PM (#1968036)
Racket would make a great web language...
Re:Zed Shaw: Tir Web Framework Officially Up by vito on Friday December 03, 2010 @08:24PM (#1968091)
Racket is highly underrated. I wish more people would use/talk about/evangelize it.
Re:Zed Shaw: Tir Web Framework Officially Up by jhpriestley on Friday December 03, 2010 @06:38PM (#1967862)
Code written in the continuation monad (i.e., simple imperative style) can be translated to an Automaton arrow and fit into a Haskell on a Horse application. This approach has the advantage of type-safety and greater composability.
Re:Zed Shaw: Tir Web Framework Officially Up by cullenking on Friday December 03, 2010 @08:03PM (#1968037)
Not sure if I should laugh at myself for not knowing if this was a joke when I first read it.
Re:Zed Shaw: Tir Web Framework Officially Up by kanwisher on Friday December 03, 2010 @09:30PM (#1968248)
LOL for some reason I feel less smart after reading that comment ;) had to look up each word
Re:Zed Shaw: Tir Web Framework Officially Up by ericlavigne on Friday December 03, 2010 @09:36PM (#1968266)
You can also find continuation-based web frameworks in Common Lisp and Scheme.

http://common-lisp.net/project/cl-weblocks/

http://common-lisp.net/project/ucw/

http://docs.racket-lang.org/web-server/

Re:Zed Shaw: Tir Web Framework Officially Up by draegtun on Saturday December 04, 2010 @11:38AM (#1969544)
For Perl based solution have a look at Continuity (http://search.cpan.org/dist/Continuity/).

I have posted some Continuity code here before (see http://news.ycombinator.com/item?id=1686177 & http://news.ycombinator.com/item?id=1006071).

Also check out Squatting (http://search.cpan.org/dist/Squatting/) which is a RESTful MVC micro framework which (by default) sits on top of Continuity.

Re:Zed Shaw: Tir Web Framework Officially Up by zedshaw on Friday December 03, 2010 @11:07PM (#1968471)
The main feature that is required is the ability to callcc and/or coroutine yield from any point in the stack. If you look at Wee, the user of the framework has to callcc all over the place to make it work. In Tir I have web:prompt(), which itself does the yielding without anyone having to care.

The significance of this is that Tir can provide one API for all three styles without special effort from the user.

Re:Zed Shaw: Tir Web Framework Officially Up by clyfe on Saturday December 04, 2010 @04:18AM (#1968917)
A "How it's made" blog post would make an awesome next article!
Re:Zed Shaw: Tir Web Framework Officially Up by apoirier on Monday December 06, 2010 @10:21AM (#1975413)
Nagare (http://nagare.org) for Stackless Python
Re:Zed Shaw: Tir Web Framework Officially Up by grandalf on Friday December 03, 2010 @05:38PM (#1967719)
very cool! looking forward to trying it out.