Re: Why shouldn't sleep(0.5) DWIM?

2001-01-31 Thread Branden
Nicholas Clark wrote: On Wed, Jan 31, 2001 at 12:58:01PM +0100, Bart Lateur wrote: It doesn't have to be like that. Functions that are not in the core can still be automatically loaded, but only if your code actually uses them. That could make the perl kernel a lot smaller than it is now,

Re: Vtables: what do we know so far?

2001-01-31 Thread Branden
Matthew Cline wrote: Should there be method to tell an SV to change the internal representation of the data? For example, if an SV was created as a string, but is being turned into a float over and over again for use in equations, it would save processing time to convert the internal

Re: Why shouldn't sleep(0.5) DWIM?

2001-01-31 Thread Jarkko Hietaniemi
On Wed, Jan 31, 2001 at 09:47:59AM -0500, James Mastros wrote: On Wed, Jan 31, 2001 at 09:53:23AM -0200, Branden wrote: Because with a better built-in that handles fractions of second (if that's ever desired, and I guess it is), time() would be deprecated and could be easily reproduced as

Re: Why shouldn't sleep(0.5) DWIM?

2001-01-31 Thread Jarkko Hietaniemi
On Wed, Jan 31, 2001 at 09:49:59AM -0500, Andy Dougherty wrote: On Wed, 31 Jan 2001, Bart Lateur wrote: On Tue, 30 Jan 2001 21:39:25 +0100, [EMAIL PROTECTED] wrote: Why the urge to move it out of the core? Should perl6 be like Python, where you first need to do a gazillion imports

Re: Why shouldn't sleep(0.5) DWIM?

2001-01-31 Thread John Porter
James Mastros wrote: (And please, don't get into epoch discussions here. The units, accuracy, resolution, and zeropoint of a measurement are all different questions. I personaly would prefer to see units of seconds, a basepoint of 1/1/1970, and resolution and accuracy

Re: Why shouldn't sleep(0.5) DWIM?

2001-01-31 Thread Casey R. Tweten
Today around 3:45pm, Andreas J. Koenig hammered out this masterpiece: : On Wed, 31 Jan 2001 12:04:46 +, Nicholas Clark [EMAIL PROTECTED] said: : : dbmopen() already loads AnyDBM_File to do the real work without the : user (or script) knowing, so this idea could be extended. : :

Re: Why shouldn't sleep(0.5) DWIM?

2001-01-31 Thread James Mastros
On Wed, Jan 31, 2001 at 09:53:23AM -0200, Branden wrote: Because with a better built-in that handles fractions of second (if that's ever desired, and I guess it is), time() would be deprecated and could be easily reproduced as int(now()) or anything like it. Why can't we change the meaning of

Re: Why shouldn't sleep(0.5) DWIM?

2001-01-31 Thread Andreas J. Koenig
On Wed, 31 Jan 2001 12:04:46 +, Nicholas Clark [EMAIL PROTECTED] said: dbmopen() already loads AnyDBM_File to do the real work without the user (or script) knowing, so this idea could be extended. And nobody in this thread has ever mentioned Time::HiRes. Is there a reason? --

Re: Why shouldn't sleep(0.5) DWIM?

2001-01-31 Thread Branden
James Mastros wrote: Why can't we change the meaning of time() slightly without changing to a different function name? Yes, it will silently break some existing code, but that's OK -- remember, 90% with traslation, 75% without. being in that middle 15% isn't a bad thing. I share your

Re: Why shouldn't sleep(0.5) DWIM?

2001-01-31 Thread Simon Cozens
On Wed, Jan 31, 2001 at 12:04:46PM +, Nicholas Clark wrote: It doesn't have to be like that. Functions that are not in the core can still be automatically loaded, but only if your code actually uses them. That could make the perl kernel a lot smaller than it is now, and hopefully,

Re: Why shouldn't sleep(0.5) DWIM?

2001-01-31 Thread Andy Dougherty
On Wed, 31 Jan 2001, Casey R. Tweten wrote: opinion Not that there needs to be any discussion on this but IMHO things that can reasonably live outside the core should. I heard somewhere that most people think this way too. This is why there hasn't been much discussion on it -- there's not

Re: Why shouldn't sleep(0.5) DWIM?

2001-01-31 Thread Bart Lateur
On Wed, 31 Jan 2001 08:53:13 -0600, Jarkko Hietaniemi wrote: So nice of you to volunteer for being our help desk person man for explaining to people why their time() just got broken :-) I'd use the same function name for both the integer version of time(), and the hires version. All you need is

Re: Why shouldn't sleep(0.5) DWIM?

2001-01-31 Thread Jarkko Hietaniemi
On Wed, Jan 31, 2001 at 04:25:46PM +0100, Bart Lateur wrote: On Wed, 31 Jan 2001 08:53:13 -0600, Jarkko Hietaniemi wrote: So nice of you to volunteer for being our help desk person man for explaining to people why their time() just got broken :-) I'd use the same function name for both

Re: Why shouldn't sleep(0.5) DWIM?

2001-01-31 Thread Andy Dougherty
On Wed, 31 Jan 2001, Bart Lateur wrote: On Tue, 30 Jan 2001 21:39:25 +0100, [EMAIL PROTECTED] wrote: Why the urge to move it out of the core? Should perl6 be like Python, where you first need to do a gazillion imports before you can do anything useful? Say goodbye to quick one-liners then.

Re: safe signals + sub-second alarms [was: sleep(0.5) should DWIM]

2001-01-31 Thread Ken Fox
Bart Lateur wrote: What if we take the ordinary sleep() for the largest part of the sleeping time (no busy wait), and the 4 argument select for the remainder, i.e. subsecond? You're trying to solve a problem that doesn't exist. Sleep doesn't have the signal delivery problems that alarm has,

Re: Why shouldn't sleep(0.5) DWIM?

2001-01-31 Thread David Mitchell
James Mastros [EMAIL PROTECTED] writes: Why can't we change the meaning of time() slightly without changing to a different function name? Yes, it will silently break some existing code, but that's OK -- remember, 90% with traslation, 75% without. being in that middle 15% isn't a bad thing.

safe signals + sub-second alarms [was: sleep(0.5) should DWIM]

2001-01-31 Thread Ken Fox
Branden wrote: Actually, with event loops and threading issues, probably things like the perl built-ins sleep and alarm won't ever be passed to the syscalls sleep(3) and alarm(3). Sleep isn't usually a syscall -- it's often a library routine that sets an alarm and blocks or uses some other

Re: safe signals + sub-second alarms [was: sleep(0.5) should DWIM]

2001-01-31 Thread Bart Lateur
On Wed, 31 Jan 2001 11:36:32 -0500, Ken Fox wrote: You want perl to block a thread and then busy wait until it's time for the thread to wake up? What if we take the ordinary sleep() for the largest part of the sleeping time (no busy wait), and the 4 argument select for the remainder, i.e.

Thought for the day

2001-01-31 Thread Simon Cozens
Never over-design. Never think "Hmm, maybe somebody would find this useful". Start from what you know people _have_ to have, and try to make that set smaller. When you can make it no smaller, you've reached one point. That's a good point to start from - use that for some real

Re: Thought for the day

2001-01-31 Thread Jarkko Hietaniemi
On Wed, Jan 31, 2001 at 05:55:13PM +, Simon Cozens wrote: Never over-design. Never think "Hmm, maybe somebody would find this useful". Start from what you know people _have_ to have, and try to make that set smaller. When you can make it no smaller, you've reached one point.

Re: Thought for the day

2001-01-31 Thread Simon Cozens
On Wed, Jan 31, 2001 at 12:05:46PM -0600, Jarkko Hietaniemi wrote: I've always shaken my head in disbelief when people measure/brag about programming prowess by the number of lines of code written. A true programmer is able to delete lines and still achieve the same functionality while

Re: Thought for the day

2001-01-31 Thread Ken Fox
I like Linus' quote, but that spirit would probably push Perl too far into the computer scientists' language traps. Here's a Frank Lloyd Wright quote I think works a bit better: Five lines where three are enough is stupidity. Nine pounds where three are sufficient is stupidity. But to

RE: Thought for the day

2001-01-31 Thread Garrett Goebel
From: Simon Cozens [mailto:[EMAIL PROTECTED]] Never over-design. Never think "Hmm, maybe somebody would find this useful". Start from what you know people _have_ to have, and try to make that set smaller. When you can make it no smaller, you've reached one point. That's a good point to

Re: Why shouldn't sleep(0.5) DWIM?

2001-01-31 Thread Michael G Schwern
On Wed, Jan 31, 2001 at 05:23:43PM -0500, Dan Sugalski wrote: Pulling out or mangling time strikes me as intensely pointless, and I don't see it happening. The socket stuff is really the only core functionality that makes any sense to pull out, and that only from an architectural

Re: Why shouldn't sleep(0.5) DWIM?

2001-01-31 Thread Damian Conway
Or, should we just implement usleep() and (for lack of a better name) snooze() is a better name ;-) nap() is even better (shorter that sleep() :-) Damian

Re: Why shouldn't sleep(0.5) DWIM?

2001-01-31 Thread Dan Sugalski
At 10:58 PM 1/31/2001 +0100, [EMAIL PROTECTED] wrote: On Wed, Jan 31, 2001 at 09:53:23AM -0200, Branden wrote: [EMAIL PROTECTED] wrote: sub Time::Local::time { return int(CORE::now()); } Why the urge to move it out of the core? Should perl6 be like Python,

Re: Thought for the day

2001-01-31 Thread Tim Bunce
On Wed, Jan 31, 2001 at 05:55:13PM +, Simon Cozens wrote: Never over-design. Never think "Hmm, maybe somebody would find this useful". Start from what you know people _have_ to have, and try to make that set smaller. When you can make it no smaller, you've reached one point.

Re: Why shouldn't sleep(0.5) DWIM?

2001-01-31 Thread abigail
On Wed, Jan 31, 2001 at 10:18:19AM -0500, Andy Dougherty wrote: On Wed, 31 Jan 2001, Casey R. Tweten wrote: opinion Not that there needs to be any discussion on this but IMHO things that can reasonably live outside the core should. I heard somewhere that most people think this way

Re: Thought for the day

2001-01-31 Thread Dave Storrs
On Wed, 31 Jan 2001, Tim Bunce wrote: Since this thread is in the mood for quotes, here's one I'm fond of... It goes something along the lines of: Any fool can create a complicated system. The real skill is in making a simple one. Ok, if we're all contributing

Re: Why shouldn't sleep(0.5) DWIM?

2001-01-31 Thread abigail
On Wed, Jan 31, 2001 at 12:58:01PM +0100, Bart Lateur wrote: On Tue, 30 Jan 2001 21:39:25 +0100, [EMAIL PROTECTED] wrote: Why the urge to move it out of the core? Should perl6 be like Python, where you first need to do a gazillion imports before you can do anything useful? Say goodbye to