[BLOG] A different perspective on Ruby.

F

furufuru

First, an OT question: Is there a Firefox extension that lets me
*quickly* disable/enable page colors?

Use Opera! :) Shift+G toggles between the user and author modes.
Really handy. I switch to the author mode only when page colors
matter.

No offense intended, but Opera is far more feature-rich, (yet the
features
are hidden until you explicitly unleash them), a bit lighter (less than
4 MB including flash and friends), a bit snappier (may depend on you
environment), etc. What's the catch? Nothing, except for the small
add
which is displayed if you don't pay (about US$40).

Sorry I couldn't resist to the chance of advocacy. :)
I'm simpy a fan of Opera; I have nothing to do with the company,
by the way.

Cheers,
Ryo
 
L

Linus Sellberg

Use Opera! :) Shift+G toggles between the user and author modes.

Or be lazy and install the prefbar plugin. Has a lot of other nice
features like being able to turn on and off showing images,
animations, javascript, flash, popups etc.
 
J

James Britt

Linus said:
Or be lazy and install the prefbar plugin. Has a lot of other nice
features like being able to turn on and off showing images,
animations, javascript, flash, popups etc.

A few people recommended "Bookmarklets for Zapping Annoyances"

http://www.squarefree.com/bookmarklets/zap.html

which works quite well for me (and thanks to those who responded).


James



--

http://www.ruby-doc.org - The Ruby Documentation Site
http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML
http://www.rubystuff.com - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com - Playing with Better Toys
 
J

Jon A. Lambert

Andrew said:
Despite the fucking swearing, he did come up with a list of almost
everything that has confused or annoyed me since I started using ruby.

I thought so. Specifically I think he nailed some things which aren't
language artifacts that one has to accept.

You can't tell what raises what.
Half the socket routines return bullshit.
The threading model is about as useful as slamming your dick in a vise.

These are all horribly designed and can be fixed.
 
M

Mark Hubbart

=20
Glenn Parker said:
There is no backwards or forwards here.
=20
As long as we are only talking asthetics, then I agree that either choice
is co-equal, neither is backwards or forwards. In fact, I would tend to
agree that sqrt(n) is more asthetically pleasing than n.sqrt.
=20
However ...
=20
But if we are talking maintenance (cf. "[sqrt as a method] spreads the
definition out, which complicates maintainence"), then I think it is clea= r
that the method implementation is (1) no more "spread out" that the
current implementation, (2) simpler to extend to for new types (e.g.
Complex). It is the stand-alone function (not method) implementation tha= t
complicates maintainence. That is the part I thought was backwards.

'mathn' tries to patch the sqrt functionality, but doesn't get it
completely. look at the inconsistencies in the following examples,
remembering that precisely, sqrt(-1) should yield Complex(0,1) (aka:
"i"), and sqrt(n) is exactly the same as n**(1/2):

require 'mathn'
=3D=3D>true
Math.sqrt(-1)
=3D=3D>Complex(0, 1)
(-1)**(1/2)
=3D=3D>Complex(6.12323399573677e-17, 1.0)
(-1)**0.5
=3D=3D>NaN
Math.sqrt(-1.0)
=3D=3D>Complex(0, 1.0)
(-1.0)**(1/2)
=3D=3D>NaN
(-1.0)**(0.5)
=3D=3D>NaN

These all should have given either Complex(0, 1) or Complex(0, 1.0).
The one with the tiny float value could be given an "A" for effort,
perhaps, but NaN? Really, now.

If sqrt was added as a method, it could be defined as self ** 0.5, and
I imagine it would be much easier to keep everything in sync.
Requiring 'mathn' would change that to self ** (1/2), and then
override **() to handle rationals.

just my 2=A2,
Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top