Ask a Question related to Ruby, Design and Development.
-
gabriele renzi #1
Re: Speaking of I18N...
il Wed, 2 Jul 2003 04:59:05 +0900, "Hal E. Fulton"
<hal9000@hypermetrics.com> ha scritto::
there is an example of this in soap4r, or>I don't suppose anyone has implemented any
>kind of interface to babelfish? Something
>like
>
> string2 = babelfish(string, from_lang, to_lang)
>
>by any chance?
in soap4r one of the sample is this ^_^
gabriele renzi Guest
-
i18n
Hi! Are there any turorials how to internationalize a ruby program? Any help is welcome. thx Gergo -- +----------+ |... -
speaking of php editors
Check out vim or emacs... -- BigDog On Mon, 2003-09-22 at 17:41, Chris W. Parker wrote: -
gettext i18n
Hi, Thanks for the reply, but it doesn't work this way either. in /www/locale I do have de/ LC_MESSAGES/ messages.mo de_DE/ LC_MESSAGES/ -
accessibility question: adding aural pauses to speaking browsers?
Does anyone know the proper markup to use, or a trick to insert a pause in a speaking browser? I am using IBM Home Page Reader... I have text where... -
Speaking of Ruby T-shirts...
If anyone wants to contribute ideas to the Ruby.shop, feel free... the only pay you get is acknowledgement, however. (See the link at... -
Bermejo, Rodrigo #2
Re: Speaking of I18N...
On the 'ruby developers guide', there is an exemple which do it
require 'soap/driver'
......
result = driver.BabelFish(lang, input.read)
gabriele renzi wrote:
>il Wed, 2 Jul 2003 04:59:05 +0900, "Hal E. Fulton"
><hal9000@hypermetrics.com> ha scritto::
>
>
>>>>I don't suppose anyone has implemented any
>>kind of interface to babelfish? Something
>>like
>>
>> string2 = babelfish(string, from_lang, to_lang)
>>
>>by any chance?
>>
>>
>there is an example of this in soap4r, or
>in soap4r one of the sample is this ^_^
>
>
Bermejo, Rodrigo Guest
-
Chad Fowler #3
Re: Speaking of I18N...
Hal E. Fulton wrote:
I did a screen-scraping one some time back. It was truly a>I don't suppose anyone has implemented any
>kind of interface to babelfish? Something
>like
>
> string2 = babelfish(string, from_lang, to_lang)
>
>by any chance?
>
>I realize the results it gives are crude.
>
>Hal
>
>--
>Hal Fulton
>hal9000@hypermetrics.com
>
>
>
several-minute hack. I put it in RAA under the "Jokes" category, but I
don't think it works anymore (since I depended on the HTML output of
babelfish for it to work). I should probably either fix it or remove
it, though I guess being under the Joke category, it's not going to have
a huge impact on RAA's credibility. :)
I also had a method called "stupidize", which would translate text to
and from a language, allowing it to suffer the often hilarious semantic
distortion that you get from Babelfish.
Chad
Chad Fowler Guest
-
Hal E. Fulton #4
Re: Speaking of I18N...
----- Original Message -----
From: "Bermejo, Rodrigo" <rodrigo.bermejo@ps.ge.com>
To: "ruby-talk ML" <ruby-talk@ruby-lang.org>
Sent: Tuesday, July 01, 2003 4:28 PM
Subject: Re: Speaking of I18N...
I should have known this... I have had that book>
> On the 'ruby developers guide', there is an exemple which do it
>
> require 'soap/driver'
> ......
> result = driver.BabelFish(lang, input.read)
for a long time.
Thanks,
Hal
--
Hal Fulton
[email]hal9000@hypermetrics.com[/email]
Hal E. Fulton Guest
-
Hal E. Fulton #5
Re: Speaking of I18N...
----- Original Message -----
From: "Chad Fowler" <chadfowler@chadfowler.com>
To: "ruby-talk ML" <ruby-talk@ruby-lang.org>
Sent: Tuesday, July 01, 2003 5:53 PM
Subject: Re: Speaking of I18N...
That hilarious semantic distortion is also interesting> I did a screen-scraping one some time back. It was truly a
> several-minute hack. I put it in RAA under the "Jokes" category, but I
> don't think it works anymore (since I depended on the HTML output of
> babelfish for it to work). I should probably either fix it or remove
> it, though I guess being under the Joke category, it's not going to have
> a huge impact on RAA's credibility. :)
>
> I also had a method called "stupidize", which would translate text to
> and from a language, allowing it to suffer the often hilarious semantic
> distortion that you get from Babelfish.
in a theoretical sense (to me, at least). I find myself
sometimes wondering if there might be a way to measure
the drift in meaning -- I tend to think that a one-way
translation is probably only "half as garbled" (whatever
that means!) as a two-way one.
But if that's true, it implies there must be some way
to quantify it -- or else my thinking is just nonsense.
And then that raises issues like: If I translate something
from English to German and then back again, is more meaning
lost on the first leg of that trip or the second leg? Is it
different translating lang X to lang Y for different values
of X and Y? It would have to be, I think.
But I've wandered offtopic, as I do so well.
I'll check out the SOAP4R thing.
Hal
--
Hal Fulton
[email]hal9000@hypermetrics.com[/email]
Hal E. Fulton Guest
-
Hal E. Fulton #6
Re: Speaking of I18N...
----- Original Message -----
From: "Chad Fowler" <chadfowler@chadfowler.com>
To: "ruby-talk ML" <ruby-talk@ruby-lang.org>
Sent: Tuesday, July 01, 2003 5:53 PM
Subject: Re: Speaking of I18N...
> Hal E. Fulton wrote:
>> >I don't suppose anyone has implemented any
> >kind of interface to babelfish? Something
> >likeWell, the screen-scraper might be a lightweight option...> I did a screen-scraping one some time back. It was truly a
> several-minute hack. I put it in RAA under the "Jokes" category, but I
> don't think it works anymore (since I depended on the HTML output of
> babelfish for it to work). I should probably either fix it or remove
> it, though I guess being under the Joke category, it's not going to have
> a huge impact on RAA's credibility. :)
the one with soap4r works great, but I had to install:
- soap4r
- rexml
- http-access2
- devel-logger
And I'm not sure any of these work with raa-install. I *thought*
the first one was working... but I couldn't find any of the
samples and such, unless I installed manually. And I had to do
them one at a time, since I could only discover dependencies
by the "run and crash" method.
Or to be fair, it might be in the docs. :) :)
Is raa-install currently healthy? It's supposed to be self-updating,
but "raa-install -i raa-install" doesn't work for me.
Cheers,
Hal
--
Hal Fulton
[email]hal9000@hypermetrics.com[/email]
Hal E. Fulton Guest
-
Brian Candler #7
Re: More error backtrace
On Thu, Jul 03, 2003 at 06:43:03AM +0900, Nigel Gilbert wrote:
in eval.c:> What I need to know are which lines of code are represented by "... 6
> levels...". Is there any way of stopping ruby from abbreviating the
> backtrace like this?
#define TRACE_MAX (TRACE_HEAD+TRACE_TAIL+5)
#define TRACE_HEAD 8
#define TRACE_TAIL 5
So you could change those constants. But easier, wrap your code in something
like this:
begin
... do your code
rescue Exception => e
puts "#{e} (#{e.class})\n#{e.backtrace.join("\n")}"
end
Regards,
Brian.
Brian Candler Guest
-
Tom Clarke #8
Re: More error backtrace
I've been wondering for some time why it did this.
Just curious, what's the rationale for truncating it?
-Tom
On Wed, 2003-07-02 at 17:57, Brian Candler wrote:> On Thu, Jul 03, 2003 at 06:43:03AM +0900, Nigel Gilbert wrote:>> > What I need to know are which lines of code are represented by "... 6
> > levels...". Is there any way of stopping ruby from abbreviating the
> > backtrace like this?
> in eval.c:
>
> #define TRACE_MAX (TRACE_HEAD+TRACE_TAIL+5)
> #define TRACE_HEAD 8
> #define TRACE_TAIL 5
>
> So you could change those constants. But easier, wrap your code in something
> like this:
>
> begin
> ... do your code
> rescue Exception => e
> puts "#{e} (#{e.class})\n#{e.backtrace.join("\n")}"
> end
>
> Regards,
>
> Brian.
>
>
Tom Clarke Guest
-
Hal E. Fulton #9
Re: More error backtrace
----- Original Message -----
From: "Tom Clarke" <tom@u2i.com>
To: "ruby-talk ML" <ruby-talk@ruby-lang.org>
Sent: Wednesday, July 02, 2003 6:00 PM
Subject: Re: More error backtrace
I always assumed it was to save space. Does it> I've been wondering for some time why it did this.
>
> Just curious, what's the rationale for truncating it?
do it when the levels are unique? I've personally
only seen it when there's a recursion problem and
thus a stack overflow. In a case like that, there's
no loss of information.
Hal
--
Hal Fulton
[email]hal9000@hypermetrics.com[/email]
something> -Tom
>
> On Wed, 2003-07-02 at 17:57, Brian Candler wrote:> > On Thu, Jul 03, 2003 at 06:43:03AM +0900, Nigel Gilbert wrote:> >> > > What I need to know are which lines of code are represented by "... 6
> > > levels...". Is there any way of stopping ruby from abbreviating the
> > > backtrace like this?
> > in eval.c:
> >
> > #define TRACE_MAX (TRACE_HEAD+TRACE_TAIL+5)
> > #define TRACE_HEAD 8
> > #define TRACE_TAIL 5
> >
> > So you could change those constants. But easier, wrap your code in>> > like this:
> >
> > begin
> > ... do your code
> > rescue Exception => e
> > puts "#{e} (#{e.class})\n#{e.backtrace.join("\n")}"
> > end
> >
> > Regards,
> >
> > Brian.
> >
> >
>
Hal E. Fulton Guest
-
Brian Candler #10
Re: More error backtrace
On Thu, Jul 03, 2003 at 08:39:26AM +0900, Hal E. Fulton wrote:
No, at least not in 1.6.8:>> > Just curious, what's the rationale for truncating it?
> I always assumed it was to save space. Does it
> do it when the levels are unique?
#define TRACE_MAX (TRACE_HEAD+TRACE_TAIL+5)
#define TRACE_HEAD 8
#define TRACE_TAIL 5
ep = RARRAY(errat);
for (i=1; i<ep->len; i++) {
if (TYPE(ep->ptr[i]) == T_STRING) {
fprintf(stderr, "\tfrom %s\n", RSTRING(ep->ptr[i])->ptr);
}
if (i == TRACE_HEAD && ep->len > TRACE_MAX) {
fprintf(stderr, "\t ... %ld levels...\n",
ep->len - TRACE_HEAD - TRACE_TAIL);
i = ep->len - TRACE_TAIL;
}
}
}
}
i.e. it shows just the first 8 lines and the last 5 lines.
Cheers,
Brian.
Brian Candler Guest



Reply With Quote

