Live data from Hacker News

Zed Shaw: Tir Web Framework Officially Up

sheddingbikes.com

51–60 of 70 posts

Re: Zed Shaw: Tir Web Framework Officially Up

#51
post #39
post #35

Earlier quoted context omitted.

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?

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,…

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

#52

Earlier quoted context omitted.

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.)

They did Unix in the 70s; C was pretty nice then too.

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

#53
post #5

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?

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

#54
post #47

Earlier quoted context omitted.

this is awesome, feel like writing it for ruby too?

I don't know ruby... but RoR is an established platform, I would think it would have something similar?

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

#55
post #37

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."

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.

A "How it's made" blog post would make an awesome next article!

Re: Zed Shaw: Tir Web Framework Officially Up

#56
post #51
post #39

Earlier quoted context omitted.

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,…

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.

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

#57
post #53
post #5

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?

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/.

Want to grab a beer?

Re: Zed Shaw: Tir Web Framework Officially Up

#58
post #5

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?

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

#59
post #41
post #5

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?

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.

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

#60
post #9

Earlier quoted context omitted.

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…

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.

Don't get addicted to Brain Crack: http://www.youtube.com/watch?v=24prm3XjVgk
Post reply on HN