[27278] in Perl-Users-Digest
Perl-Users Digest, Issue: 9034 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Mar 9 06:05:51 2006
Date: Thu, 9 Mar 2006 03:05:07 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Thu, 9 Mar 2006 Volume: 10 Number: 9034
Today's topics:
Re: merge event loops and threads (was Re: simple point <tassilo.von.parseval@rwth-aachen.de>
Re: regexp: segmentation fault <sm244@kent.ac.uk>
Re: Year of day in localtime and timelocal don't match? (Anno Siegel)
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 9 Mar 2006 08:54:27 +0100
From: "Tassilo v. Parseval" <tassilo.von.parseval@rwth-aachen.de>
Subject: Re: merge event loops and threads (was Re: simple pointer operations (newbe))
Message-Id: <47a59kFdtkbgU1@news.dfncis.de>
Also sprach robic0:
> On Mon, 6 Mar 2006 08:59:07 +0100, "Tassilo v. Parseval" <tassilo.von.parseval@rwth-aachen.de> wrote:
>
>>Also sprach Uri Guttman:
>>> i have an idea and most of the design for a module that will allow event
>>> loops to work well with kernel (not perl!) threads that will run
>>> blocking operations. of course it involves xs which i have done very
>>> little with. would you (or anyone else) be interested in working on it
>>> with (or for :) me? one variation on it (which could use this new module
>>> or be its own module) would do true async file i/o and be synchronized
>>> with the event loop. i have done such a beast before in pure c and it
>>> worked very well. i think these modules are wanted and would be useful
>>> to many event loop apps. imagine a simple api for async file i/o in perl
>>> that was actually portable and bypasses all those wacko kernel aio apis
>>> that each OS provides.
>>
>>The specifications sound tempting although you didn't state how you'd
>>actually want to achieve the asynchronity when you avoid the existing
>>async IO mechanisms (of which each is unportable by nature). Does your
>>plan include rolling your own async IO scheme?
>>
>>Also, I don't yet see how kernel threads come into this. Perl programs
>>don't have access to them other than through perl's ithreads.
>>
> Now wait a minute. Are you saying Perl programs "don't" have direct access
> to the underlying OS api core?
I did not say this. Perl programs can be given access to whatever
interface the underlying operating system has to offer.
> Well, how come? Apparently, Perl programs can do "pointer arithmatic".
> Heh, where the fuck does those docs exist?
You are talking gibberish. No one was talking about pointer arithmetic
in this thread. The topic was async IO and how to do it portably in
Perl.
> So, the whole Perl thing is just a blow-me bullshit cover for really doing
> C pointers. Well, holy GOD, why didn't they just say so. I could have used
> any number of regex c-libs out there. Didn't know Perl was just a neo training
> camp for the stupedist of C programmers. I didn't realize there was such a lack
> of C/C++ (which is not the point), and of course the most important, a/the
> OS Api.
The topic was async IO and how to do it portably in Perl.
> Control and synchronization programming (blocking, etc) is a talent that you
> can't just read-up on. Windows kernel, which provides "all" control programming
> to user apps, uses "multiple blocking nomenclature and schem's", pseudo (name)
> categories, hard/soft/level.
Once again: The topic was async IO and how to do it portably in Perl.
Who cares about the Windows kernel in this context?
> You guys don't know your ass from your elbow!
You're well advised to just lurk if you have nothing to contribute which
you so seldom have.
Tassilo
--
use bigint;
$n=71423350343770280161397026330337371139054411854220053437565440;
$m=-8,;;$_=$n&(0xff)<<$m,,$_>>=$m,,print+chr,,while(($m+=8)<=200);
------------------------------
Date: Thu, 09 Mar 2006 10:19:27 +0000
From: "S.Marion" <sm244@kent.ac.uk>
Subject: Re: regexp: segmentation fault
Message-Id: <duovff$7j5$1@oheron.kent.ac.uk>
Any thoughts??
------------------------------
Date: 9 Mar 2006 10:35:03 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Year of day in localtime and timelocal don't match?
Message-Id: <dup0cn$lbo$2@mamenchi.zrz.TU-Berlin.DE>
J Moreno <planB@newsreaders.com> wrote in comp.lang.perl.misc:
> Gunnar Hjalmarsson <noreply@gunnar.cc> wrote:
>
> > J Moreno wrote:
> > > As I read the documentation, the day of the year in both should be the
> > > same, but when I run the script below, they differ by a day (I get the
> > > day before the today's day as returned by localtime).
> > >
> > > Is this a problem with the documentation, my reading of the
> > > documentation, or a bug (i.e. do I have to check to see if the behavior
> > > changes based upon version or something)?
> >
> > <snip>
> > > ($b,$b,$b,$b,$b,$b,$b,$day_of_year) = localtime;
> > >
> > > print "From localtime: " . $day_of_year;
> >
> > From "perldoc -f localtime":
> > "$yday is the day of the year, in the range 0..364 (or 0..365 in leap
> > years.)"
> >
> > Hence you need to pass $day_of_year+1 to timelocal_nocheck() to make the
> > 8:th element returned by localtime() equal $day_of_year.
>
> I'm clear as to what localtime returns, it's timelocal_nocheck's desired
> input that I'm not so clear on.
Read Gunnar's reply again. The day_of_year count starts at 0, the
day_of_month count starts at 1. That goes for the return values of
localtime() as well as for the input parameters of timelocal() and
timelocal_nocheck(). You are using a day_of_year type count as
a day_of_month type argument. Of course the result is off by one.
Anno
--
If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers.
------------------------------
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 9034
***************************************