Another Ruby-powered site

http://qurl.net/ – a couple of hours with Ruby and FastCGI.

After only bothering with PHP for web stuff, I now feel like I could
seriously concider Ruby over it. It’s very refreshing having a “nice”
language instead of one that always seems to get in my way :slight_smile:

<eyes 35,000 user site on same machine>

···

:slight_smile:


Thomas ‘Freaky’ Hurst - freaky@aagh.net - http://www.aagh.net/

and a useful service, btw…

···

il Tue, 26 Aug 2003 21:58:21 +0900, Thomas Hurst tom.hurst@clara.net ha scritto::

http://qurl.net/ – a couple of hours with Ruby and FastCGI.

Neat. Another of the same ilk is http://tinyurl.com/, which doesn’t
make you wait at a splash screen while it redirects.

···

— gabriele renzi surrender_it@rc1.vip.ukl.yahoo.com wrote:

il Tue, 26 Aug 2003 21:58:21 +0900, Thomas Hurst > tom.hurst@clara.net > ha scritto::

http://qurl.net/ – a couple of hours with Ruby and FastCGI.

and a useful service, btw…


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

Michael Campbell wrote:

···

— gabriele renzi surrender_it@rc1.vip.ukl.yahoo.com wrote:

il Tue, 26 Aug 2003 21:58:21 +0900, Thomas Hurst >>tom.hurst@clara.net >>ha scritto::

http://qurl.net/ – a couple of hours with Ruby and FastCGI.

and a useful service, btw…

Neat. Another of the same ilk is http://tinyurl.com/, which doesn’t
make you wait at a splash screen while it redirects.

And tinyurl.com doesn’t call you a dumbass for entering a invalid url! :wink:

Michael

qurl lets you set that option under “preferences”

Ari

···

On Tue, 2003-08-26 at 13:57, Michael Campbell wrote:

— gabriele renzi surrender_it@rc1.vip.ukl.yahoo.com wrote:

il Tue, 26 Aug 2003 21:58:21 +0900, Thomas Hurst > > tom.hurst@clara.net > > ha scritto::

http://qurl.net/ – a couple of hours with Ruby and FastCGI.

and a useful service, btw…

Neat. Another of the same ilk is http://tinyurl.com/, which doesn’t
make you wait at a splash screen while it redirects.

I deliberately made it optional, because some people like to see the URL
they’re being sent to (helps avoid people hiding links to tubgirl and
co).

Anyway, just one of those little spur of the moment projects. It also
happens to be standards compliant, and I might get around to some
script-oriented stuff for it too.

Need to look at something bigger now; Ruby’s flexibility opens some
interesting possibilities for frameworks :slight_smile:

···

Neat. Another of the same ilk is http://tinyurl.com/, which doesn’t
make you wait at a splash screen while it redirects.


Thomas ‘Freaky’ Hurst - freaky@aagh.net - http://www.aagh.net/

A not unmixed blessing - /.ers have already speculated on the
possibility of tinyurling the goatse link, frinstance. The splash screen
can serve as an “are you sure you want to go there?” check.

martin

···

Michael Campbell michael_s_campbell@yahoo.com wrote:

Neat. Another of the same ilk is http://tinyurl.com/, which doesn’t
make you wait at a splash screen while it redirects.

Michael Campbell wrote:

Neat. Another of the same ilk is http://tinyurl.com/, which doesn’t
make you wait at a splash screen while it redirects.

But qurl.net is Ruby and FreeBSD driven! Those are two good reasons to
support it. Just think “religion”. :wink:

M.

Neat. Another of the same ilk is http://tinyurl.com/, which
doesn’t
make you wait at a splash screen while it redirects.

qurl lets you set that option under “preferences”

Fair enough. I’d still prefer that to be the default, but to each
his own.

···

Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

I see the smiley so the intent here isn’t lost on me. Playing
devil’s advocate however, I’m just too old and tired for religion
anymore. I used to fight the good fight and all that, and these
days, I’m looking for whatever easiest/best solves the problem at
hand.

That said, qurl.com is neat, and since I can tune the redirect
time-delay to my liking, I might use it. I’m only concerned about its
longevity. I got the impression from the author that this was thrown
up on a whim; is it meant to be permanent?

···

— Michael Vondung mvondung@gmx.net wrote:

Michael Campbell wrote:

Neat. Another of the same ilk is http://tinyurl.com/, which
doesn’t
make you wait at a splash screen while it redirects.

But qurl.net is Ruby and FreeBSD driven! Those are two good
reasons to support it. Just think “religion”. :wink:


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

Pax vobiscum,

  • Michael Vondung; 2003-08-27, 12:58 UTC:

But qurl.net is Ruby and FreeBSD driven! Those are two good
reasons to support it. Just think “religion”. :wink:

The first association that crosses my mind is ‘jihad’ - that is what
typically breaks out when mixing religion and software.

We already face battles between the Cult of the Python and the
Believers of the Ruby Way.

Do you want to see battles between the Brave School of Deity (BSD),
the Holy Church of Tux (*) and the Redmondist Church?

(*) Short for ‘Holy Church of Tuxedo Mask’, aka ‘Moon sect’

Josef ‘Jupp’ Schugt

···


By adding my mail address to your Outlook or Outlook Express address
book you accept paying me 10 EUR for each message containing malware
that I receive from you. >;->

But qurl.net is Ruby and FreeBSD driven! Those are two good reasons to
support it. Just think “religion”. :wink:
just add PostgreSQL and you’ll se another example of the most common
platform i’ve seen in this list.
Maybe we should just use the word FRAP
(FreeBSD,Ruby,Apache,PostgreSQL) as opposed to LAMP :wink:

···

il Wed, 27 Aug 2003 11:41:38 +0200, Michael Vondung mvondung@gmx.net ha scritto::

M.

But qurl.net is Ruby and FreeBSD driven! Those are two good
reasons to support it. Just think “religion”. :wink:

I see the smiley so the intent here isn’t lost on me.Playing devil’s
advocate however, I’m just too old and tired for religion anymore.I
used to fight the good fight and all that, and these days, I’m looking
for whatever easiest/best solves the problem at hand.

No religion here; Ruby and FreeBSD are simply what get the job done best
in my experience :slight_smile:

That said, qurl.com is neat, and since I can tune the redirect
time-delay to my liking, I might use it. I’m only concerned about its
longevity.I got the impression from the author that this was thrown
up on a whim; is it meant to be permanent?

Pretty much.It was thrown together on a whim, but it’s not exactly
expensive to keep running.I might change the URL allocation stuff if
my choice of characters proves to be a little too optimistic, but I
think that’s unlikely (I was quite careful to pick URL safe characters).

There’s space for ~2000 URL’s in qurl.net - This website is for sale! - qurl Resources and Information., btw; over 110,000
in /XXX.I wonder how effecient that is compared with tinyurl and
shorterlink.

Keeping on-topic; I did look at some of the caching modules people have
written, but they struck me as being rather ineffecient, involving
walking arrays equal to the size of the cache on each hit etc. Rather
than use one of these, I made this half-assed attempt:

class WeakRefHash < Hash
def
v = super(key)
default unless (v and v.weakref_alive?)
end

  def []=(key, value)
      super(key, WeakRef.new(value))
  end

end

Which is obviously less than optimal. Does anyone have any nicer
solutions? :slight_smile:

···


Thomas ‘Freaky’ Hurst - freaky@aagh.net - http://www.aagh.net/

Josef ‘Jupp’ Schugt wrote:

The first association that crosses my mind is ‘jihad’ - that is what
typically breaks out when mixing religion and software.

You saw the “;)” smiley at the end of my article, I hope! :slight_smile: I’ll admit
I’m partial to Ruby and FreeBSD, but there are no other computer
languages I use (thus Ruby is “the best” for me, but I lack the
competence to compare it to other languages), and I do run Windows and
Debian in addition to FreeBSD. If you look at the header of this post,
you’ll see that it originates from a Windows box. To me, languages and
operating systems are tools and I use the one(s) that works best for me,
for a given task.

My previous message wasn’t actually “serious”, though I do believe Ruby
deserves more “attention”. Promoting sites that apply Ruby for useful
services is one way to make it a bit more known and perhaps popular[1].
I’d call it “community development” rather than “missionary work”. :slight_smile:

M.

[1] I realise that popularity is a double-edged sword and that this
isn’t necessarily what everyone wants. It would be nice if Western
publishers were more willing to add Ruby-related books to their
selection, for example.

  class WeakRefHash < Hash

Try something like this (this is just an example)

svg% cat b.rb
#!/usr/bin/ruby
class WeakRefHash < Hash
   def final(a)
      lambda { delete(a) }
   end

   def =(key, value)
      ObjectSpace.define_finalizer(value, final(key))
      super(key, value.id)
   end
end

def a(h, k)
   h[k] =
end

h = WeakRefHash.new('default')
3.times {|i| a(h, i)}
GC.start
3.times {|i| p h[i]}

svg%

svg% b.rb
"default"
"default"
"default"
svg%

Guy Decoux

Michael Vondung wrote:

[1] I realise that popularity is a double-edged sword and that this
isn’t necessarily what everyone wants. It would be nice if Western
publishers were more willing to add Ruby-related books to their
selection, for example.

It’s a catch-22. They will add more books when the existing ones are
selling in sufficient quantities.

Hal

Try something like this (this is just an example)

bad, bad : I've forgotten #

class WeakRefHash < Hash
   def final(a)
      lambda { delete(a) }
   end

   def =(key, value)
      ObjectSpace.define_finalizer(value, final(key))
      super(key, value.id)
   end

      def (key)
         v = super(key)
         v = ObjectSpace._id2ref(v) unless v == default
         v
      end

end

Guy Decoux

Hint, hint…

:slight_smile:

···

On Thursday, August 28, 2003, at 10:24 AM, Hal Fulton wrote:

Michael Vondung wrote:

[1] I realise that popularity is a double-edged sword and that this
isn’t necessarily what everyone wants. It would be nice if Western
publishers were more willing to add Ruby-related books to their
selection, for example.

It’s a catch-22. They will add more books when the existing ones are
selling in sufficient quantities.

Does it count that I happen to have both ‘The Pragmatic Programmer’
and ‘The Ruby Way’ in my safari bookshelf constantly? :slight_smile:

Actually, this brings me to a question I’ve had for some time, do you
authors get any money when we check out your books in safari, or is it
a one time deal (i.e. you get X money if you release your books to
safari)?

I have a bad conscience regarding not to have bought these two books,
as I’d really like you to get the chance to write more, and still,
there are always the poor trees to think about. :slight_smile:

I know, I should find a hobby.

//F

···

On Fri, Aug 29, 2003 at 02:17:38AM +0900, Dave Thomas wrote:

On Thursday, August 28, 2003, at 10:24 AM, Hal Fulton wrote:

It’s a catch-22. They will add more books when the existing ones are
selling in sufficient quantities.

Hint, hint…

Actually, this brings me to a question I’ve had for some time, do you
authors get any money when we check out your books in safari, or is it
a one time deal (i.e. you get X money if you release your books to
safari)?

I’m not aware of any money coming from the books on Safari, but
you’re prompted me to ask my editor.

Cheers

Dave