Ad-hoc Update

« previous entry | next entry »
Jul. 19th, 2007 | 11:54 pm

The folks at the Quantum Random Bit Generator Service want you to prove you're human by more than just recognizing characters;


they want you to do some math, too.


those in love with fancy calculators or Mathematica and it's ilk can just write the answer
1. Differentiate
7*6*cos(x) + 4*7*-sin(x + π/2)

2. Evaluate
7*6*cos(2*π) + 4*7*-sin(2*π + π/2)
those in love with scientific calculators can skip to the last line
= 7*6*cos(2*π) + 4*7*-sin(3π/2)
= 7*6*cos(0) + 4*7*-sin(π/2)
those in love with four-function calculators can skip to the last line
= 7*6*1 + 4*7*-1
= 42 - 28
= 14

That's one of the hardest ones I've seen on the form; you can see several of us cock it up on [info]brad's post.

In other amusements, I've been attempting photography again and I might be hanging around Otakon. I'm not sure because I'm also moving (not far, but still) and I don't know who will be there.

Also, I've done My First MS API programming and I have to say that I hate how verbose everything is. For example:
Label txt = new Label();
txt.Text = "Hello world!";
txt.Font = new Font(txt.Font, FontStyle.Bold);

I'd rather write:
txt = Label.new :text => "Hello world!", :bold => true
or even:
Label txt = new Label();
txt.Text = "Hello world!";
txt.Font.Bold = true;

A getter, but not a setter, exists for the Bold property, so you have to resort to creating a new object and assigning that.
If I see any more variable names like Form1 and button3, I may stab something. Don't worry, I'll get a pumpkin for my desk.

In somewhat happy things, the GUI builder generates such awful code that I'm tempted to write one of my own that does some basic automatic refactoring and stuff. So button{1,2,3,4,5,6} are built using an array and a loop.

Link | Leave a comment | Add to Memories | Tell a Friend

Comments {13}

sinclair_furie

(no subject)

from: [info]sinclair_furie
date: Jul. 20th, 2007 06:58 am (UTC)
Link

Ah, what an awesome captcha! But I'm seriously wondering about the OCR- I guess most spambots don't really have the capabilities for dealing with math.

Reply | Thread

Atrus

(no subject)

from: [info]nikolasco
date: Jul. 20th, 2007 08:29 am (UTC)
Link

It's not terribly easy. My current plan would be to use InftyReader to get it to some (style-laden) text. Instead of really groking it, I'd use some pattern matching to recognize the common subexpressions and questions.

Reply | Parent | Thread

(no subject)

from: [info]trs80 [typekey.com]
date: Jul. 20th, 2007 07:04 am (UTC)
Link

http://elzr.com/posts/hyperscript is about as verbose as HTML, despite being JavaScript.

Reply | Thread

Atrus

(no subject)

from: [info]nikolasco
date: Jul. 20th, 2007 08:56 am (UTC)
Link

The (rough) hyperscript equivalent would be:
span('Hello world!', {style:{fontWeight:'bold'}})

Of course it's about as verbose as
<span style="font-weight:bold">Hello world!</span>
because hyperscript lightly wraps the DOM, which in turn lightly wraps HTML+CSS; so, all that really changes is the delimeters.

You could write something similar to hyperscript in .NET, but would take hundreds of lines of code ... something like
FON("label({text:'Hello world!',font:{bold:true}})")
MS would have you use XAML, I expect.

Reply | Parent | Thread

agnosticpope

(no subject)

from: [info]agnosticpope
date: Jul. 20th, 2007 04:13 pm (UTC)
Link

Welp, I guess it just goes to show that I haven't taken math in so long, I can no longer prove I'm human;)

Reply | Thread

goofball

(no subject)

from: [info]igrokme
date: Jul. 21st, 2007 02:23 pm (UTC)
Link

that was my first thought as well. =)

Reply | Parent | Thread

Dihenydd

(no subject)

from: [info]gracewanderer
date: Jul. 20th, 2007 07:00 pm (UTC)
Link

Random, unrelated question...

Do you know of any browsers that can render LaTeX?

Reply | Thread

Atrus

(no subject)

from: [info]nikolasco
date: Jul. 21st, 2007 12:03 am (UTC)
Link

No, MathML is all the rage. It's similar in concept, but XML-based. AFAIK, no one writes MathML by hand and there are several convertors from LaTeX.

Reply | Parent | Thread

Dihenydd

(no subject)

from: [info]gracewanderer
date: Jul. 21st, 2007 05:33 am (UTC)
Link

Meh. I was hoping for something that would do all of the pretty text layout things that you get with LaTeX.

Reply | Parent | Thread

Atrus

(no subject)

from: [info]nikolasco
date: Jul. 21st, 2007 02:47 pm (UTC)
Link

MathML, when done right, looks about the same as a LaTeX rendering. The test suite provides quite a few examples, with renderings. Take a look at this first-order logic example. The major thing that sucks about MathML is the syntax. There was a Mozilla extension for writing it that was pretty good, but it's not maintained and needs some love.

If you're looking for stuff like section numberings, that's best handled by pre-processing (a-la wiki markup) or some JS fidgniess. MetaPost→SVG and so on...

Reply | Parent | Thread

Dihenydd

(no subject)

from: [info]gracewanderer
date: Jul. 21st, 2007 06:02 pm (UTC)
Link

Cool, thanks. I was actually looking at just the fancy word things - kerning, ligatures, and other stuff whose names I don't remember. I think it'd be nice to be able to have really well-laid-out web pages without resorting to creating PDFs or PNGs.

If one were to write such a thing, you could have your server do the calculation-intensive work as soon as the document is saved and then send the results of the calculation to the browser.

Reply | Parent | Thread

Atrus

(no subject)

from: [info]nikolasco
date: Jul. 21st, 2007 10:09 pm (UTC)
Link

CSS provides a lot of control, like leading (via line-height) and kerning (via letter-spacing); there's no support for ligatures. I've seen good typography on the web, but I think consistent font behavior is a bigger bottleneck right now.

Reply | Parent | Thread

Luciano Bello

No need to be a human... :)

from: [info]lbello
date: Aug. 9th, 2007 12:41 pm (UTC)
Link

http://lbello.livejournal.com/44368.html

Reply | Thread