[26101] in Perl-Users-Digest
Perl-Users Digest, Issue: 8300 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Aug 2 14:05:35 2005
Date: Tue, 2 Aug 2005 11:05:08 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 2 Aug 2005 Volume: 10 Number: 8300
Today's topics:
Re: "Can't return a temporary from lvalue subroutine... <nospam-abuse@ilyaz.org>
Re: Coding Conventions and Speech: No Punctuation, Rena <vtatila@mail.student.oulu.fi>
Re: Coding Conventions and Speech: Source Analysis, Fil <vtatila@mail.student.oulu.fi>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 2 Aug 2005 16:01:39 +0000 (UTC)
From: Ilya Zakharevich <nospam-abuse@ilyaz.org>
Subject: Re: "Can't return a temporary from lvalue subroutine..."
Message-Id: <dco5d3$25jn$1@agate.berkeley.edu>
[A complimentary Cc of this posting was sent to
Tassilo v. Parseval
<tassilo.von.parseval@rwth-aachen.de>], who wrote in article <slrnde8tn1.s1.tassilo.von.parseval@localhost.localdomain>:
> >> There is no way to determine that a thing is mortal (short of walking
> >> up the mortalization stack and checking whether a value is there).
> >
> > Oh. I thought of it as some kind of flag in the SV. Tassilo had already
> > hinted as much. Obviously a little knowledge is a dangerous thing.
> > Apologies for posting a mere guess.
>
> It is a flag in the SV.
Your "it" is out of context. The boring full strory: Mortality is not
a flag in SV. What triggers the warning is not mortality, and it *is*
indeed a flag in SV.
> There are other things that cannot be done with lvalue subs that I would
> consider legitimate. For instance they only seem to work in scalar
> context while it would be nice if they could also be used to assign to
> arrays and hashes. That however could be tricky to fix.
The way they were initially implemented they worked in list context -
but not the "most obvious" way. This was the most serious
limitation. Do not know what happens now...
Hope this helps,
Ilya
------------------------------
Date: Tue, 2 Aug 2005 13:53:41 +0300
From: "Veli-Pekka Tätilä" <vtatila@mail.student.oulu.fi>
Subject: Re: Coding Conventions and Speech: No Punctuation, Renaming Operators etc...
Message-Id: <dcnjbs$4fk$1@news.oulu.fi>
Abigail wrote:
> Veli-Pekka Tätilä (vtatila@mail.student.oulu.fi) wrote on MMMMCCCLIII
> September MCMXCIII in <URL:news:dcl2un$sct$1@news.oulu.fi>:
Wow that sounds whacky with a speech synth <smile>. I mean passages like
MCMXCIII and MMMMCCCLIII that are read as words with a quivering pitch for
some reason.
> can your screen reader be tuned so it doesn't read text where the
> foreground and the background colours are the same?
<snip>
> you can (mis)use syntax highlighting by giving the punctuation you
> don't want to see the same fore- and background colours.
A good question and an interesting idea, too. As far as I know that's not
possible and I'm also using magnification so it would decrease readability.
From what I know of Supernova's inner-workings it uses systemw-wide Win32
hooks, Active Accessibility and a kernel-mode (?) Screen interception driver
to get at Windows internals and messages. Recognizing fonts is not based on
optical character recognition but it can get them as text (usually window
text, I guess). Actually, it is also able to redraw true type fonts larger
when using magnification features.
Getting the font as text means that even if I set text size to 1 it will
still get it quite right. However, window edges can clip text for some
reason.
--
With kind regards Veli-Pekka Tätilä (vtatila@mail.student.oulu.fi)
Accessibility, game music, synthesizers and programming:
http://www.student.oulu.fi/~vtatila/
------------------------------
Date: Tue, 2 Aug 2005 13:44:08 +0300
From: "Veli-Pekka Tätilä" <vtatila@mail.student.oulu.fi>
Subject: Re: Coding Conventions and Speech: Source Analysis, Filtering and Other Tacs
Message-Id: <dcniq0$4bc$1@news.oulu.fi>
Anno Siegel wrote:
>> Yes, one problem with a conventional source filter is that once the
>> source is filtered I reckon there's no easy way to see the filtered
>> end-result, is there?
> I'm not particularly acquainted with the filter modules, but I'm sure
> there is.
Quite right. Perusing the HTMl docs yields the following note in
Acme::Pythonic:
the Filter::ExtractSource manpage can be used to inspect the source code
generated by Acme::Pythonic:
perl -c -MFilter::ExtractSource pythonic_script.pl
Acme::Pythonic itself has a debug flag though:
use Acme::Pythonic debug => 1;
In debug mode the module prints to standard output the code it has
generated, and passes just a dummy 1; to the Filter::Simple manpage. <snip>
End of quote.
> preferable to leave the source code alone as much as possible and add
> reading aids only as it goes to the
> screen reader.
Yep, too bad the screen reader is closed source and does not support
scripting. The leading reader app called JAws has Support for app-specific
totally custom punctuation and Supernova's lack of this has been cursed by
some programmers for a good reason. I bet the Gnome reader Gnopernicus is
not any better, though. I briefly tried it out on a Debian system I had. I
like that Gnopernicus stays true to the original screen contents but as far
as I know doesn't have that much control over things, especially on a per
app basis.
> Oh, I didn't mean to use syntax highlighting as it comes.
OK misunderstanding cleared.
> usually switch it off if I don't have time to tune it.
Speaking of syntax highlighting on an OT:ish side-note, I don't like the one
in Visual Studio 6 the least bit. The only way of turning it off Ive found,
is to manually go through each and every darn color setting and tell it to
use the system colors.
> What I mean is, use the info a typical syntax analyzer has to change
> symbols to meaningful strings.
Sounds reasonable but rather difficult. A simple solution would be to use
the exception dictionary for the screen reader for primitive replacements.
You can let it match whole words, substrings and at start or end of word.
The trouble is if the exceptions are on, I'll get the same Perlish meanings
in every app then. In nethack an exclamation mark is quite different from
Perl, let alone an ordinary sentence, so the term exclamation remains
general enough.
Another tac would be to use sound effects for variable type, for instance,
but the readre only let's you attach them to case changes currently. I'm in
beta testing and have suggested the option be generalized, however.
> begin block level N". "$", "@"
That sounds good. If you can figure out the context I would shorten the
prompt a bit to something like begin n or even n begin if the level is the
most relevant thing. But these things come down to taste and that's why many
screen readres have fairly customizable prompts already. I can change the
prompt for spinners (spinnable lists) to cycle gadgets if I want to.
> and "%" could be translated to "scalar", "array" and
> "hash" if they come before a variable, but to "dollar", "at-sign" and
> "percent" in comments and strings. That kind of thing.
GOod that you are pointing out the context, hadn't thought of it in that
great a detail. DOllar is also used in dereferencing and braces can denote
an anonymous hash reference.
> I suppose, only a fraction of what a syntax analyzer "knows" can
> be usefully rendered in speech.
Depends I say. A good bases would be to think of how one would like the
source code read out loud by a human being first. You could then drop some
of the finest contextual differences if they seem overly difficult to
implement.
Example:
for(my $i = 0; $i < $max; ++$i)
could well be read out something like:
for my i 0, i less than max, plus plus i.
Here scalarness, assignment and parentheses would be implied and you could
take short pauses between semicolons. That's how i read absolute paths, too:
implying the dir separator by a short pause and droping colons or a leading
double back-slash in UNC names.
You'll usually get things left to right and one word at a time as speech is
what I call a linear medium (another name is straw analogy: as if you were
looking at the screen contents through a straw). Direction is almost always
left to right, too, though there are things that read out more naturaly
right to left or starting from the inner-most parentheses.
--
With kind regards Veli-Pekka Tätilä (vtatila@mail.student.oulu.fi)
Accessibility, game music, synthesizers and programming:
http://www.student.oulu.fi/~vtatila/
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 8300
***************************************