This might be too easy, it's JEG2's call.
Read in an ordinary crontab file and print out a list of
jobs that will run in the next N minutes.
Just a thought.
Cheers,
Hal
This might be too easy, it's JEG2's call.
Read in an ordinary crontab file and print out a list of
jobs that will run in the next N minutes.
Just a thought.
Cheers,
Hal
Fairly easy, but with some interesting edge cases (t + N crossing an
hour, day, month, or year boundary; dealing with leap years; dealing
with summer time/winter time switches).
-austin
On 4/3/06, Hal Fulton <hal9000@hypermetrics.com> wrote:
This might be too easy, it's JEG2's call.
Read in an ordinary crontab file and print out a list of
jobs that will run in the next N minutes.
--
Austin Ziegler * halostatue@gmail.com
* Alternate: austin@halostatue.ca
OK ... here's my nomination for a RubyQuiz challenge. I've posted a couple of hints, but I'm pretty sure there could be at least 15 unique solutions.
Given a rectangular matrix, compute its singular value decomposition.
Now, there are a lot of variants just on the problem specification alone, such as whether the matrix is sparse or dense, whether it fits in real memory or not and whether you need all of the singular values and vectors. And there are a lot of variants on the solution methods -- "pure Ruby" or interfacing to an existing C library, etc.
So let's say "pure Ruby" -- no external software in any language. And let's specify the most general case -- a large sparse "out of core" solver. The algorithms are in
http://www.netlib.org/tennessee/ut-cs-93-194.ps
The challenge then becomes to create the most *efficient* implementation in pure Ruby. So ... hacking Ruby itself *is* allowed, as is hacking and/or "developing" the virtual machine or swapping in a new one.
Hal Fulton wrote:
This might be too easy, it's JEG2's call.
Read in an ordinary crontab file and print out a list of
jobs that will run in the next N minutes.Just a thought.
Cheers,
Hal
--
M. Edward (Ed) Borasky
not to mention cron supports variables, ranges, wildcards, and lists!
-a
On Tue, 4 Apr 2006, Austin Ziegler wrote:
On 4/3/06, Hal Fulton <hal9000@hypermetrics.com> wrote:
This might be too easy, it's JEG2's call.
Read in an ordinary crontab file and print out a list of
jobs that will run in the next N minutes.Fairly easy, but with some interesting edge cases (t + N crossing an
hour, day, month, or year boundary; dealing with leap years; dealing
with summer time/winter time switches).
--
share your knowledge. it's a way to achieve immortality.
- h.h. the 14th dali lama
If I am expected to run this as a quiz, I need to see a write-up that decodes the above line enough that dummies like me could understand it...
James Edward Gray II
On Apr 11, 2006, at 9:21 AM, M. Edward (Ed) Borasky wrote:
Given a rectangular matrix, compute its singular value decomposition.
Also, "hacking Ruby itself" is pretty far beyond the scope of what I aim for with Ruby Quiz. We want problems that people can easily squeeze in. ![]()
James Edward Gray II
On Apr 11, 2006, at 9:21 AM, M. Edward (Ed) Borasky wrote:
The challenge then becomes to create the most *efficient* implementation in pure Ruby. So ... hacking Ruby itself *is* allowed, as is hacking and/or "developing" the virtual machine or swapping in a new one.
M. Edward (Ed) Borasky wrote:
The challenge then becomes to create the most *efficient* implementation in pure Ruby. So ... hacking Ruby itself *is* allowed, as is hacking and/or "developing" the virtual machine or swapping in a new one.
Speaking of hacking virtual machines, the GForth project features some cool hacks using features of GCC that might be of some use to Ruby implementers. See
for some ideas. Forth is the ultimate "virtual machine" :).
Rewriting cron in ruby
On 4/4/06, ara.t.howard@noaa.gov <ara.t.howard@noaa.gov> wrote:
On Tue, 4 Apr 2006, Austin Ziegler wrote:
> On 4/3/06, Hal Fulton <hal9000@hypermetrics.com> wrote:
>> This might be too easy, it's JEG2's call.
>>
>> Read in an ordinary crontab file and print out a list of
>> jobs that will run in the next N minutes.
>
> Fairly easy, but with some interesting edge cases (t + N crossing an
> hour, day, month, or year boundary; dealing with leap years; dealing
> with summer time/winter time switches).not to mention cron supports variables, ranges, wildcards, and lists!
-a
--
share your knowledge. it's a way to achieve immortality.
- h.h. the 14th dali lama
--
Deux choses sont infinies : l'univers et la bêtise humaine ; en ce qui
concerne l'univers, je n'en ai pas acquis la certitude absolue.
- Albert Einstein
Yes, it's ranges, wildcards, and lists that make it interesting
to me, not the edge cases. As for variables, I'm not sure what
you mean.
One reason I mention this idea is that I have had a practical need
for it on several occasions and have never got around to writing
such a tool.
Hal
ara.t.howard@noaa.gov wrote:
On Tue, 4 Apr 2006, Austin Ziegler wrote:
On 4/3/06, Hal Fulton <hal9000@hypermetrics.com> wrote:
This might be too easy, it's JEG2's call.
Read in an ordinary crontab file and print out a list of
jobs that will run in the next N minutes.Fairly easy, but with some interesting edge cases (t + N crossing an
hour, day, month, or year boundary; dealing with leap years; dealing
with summer time/winter time switches).not to mention cron supports variables, ranges, wildcards, and lists!
I thought that was Inferno...
Not to detract from Forth, of course. I wonder what a RubyVM
implementation in Forth would look like... or Limbo, for that matter.
![]()
- Dimitri
On 4/11/06, M. Edward (Ed) Borasky <znmeb@cesmail.net> wrote:
for some ideas. Forth is the ultimate "virtual machine" :).
Call me crazy, but that one sounds like fun to me. ![]()
James Edward Gray II
On Apr 4, 2006, at 6:30 AM, Robert Dober wrote:
Rewriting cron in ruby
You should aim high, and think "bigger than cron".
Create one convention-over-configuration Ruby program with Needles that
can replace crond, atd, init, supervise, inetd and anything else that
starts a program ever; make it supports port-proxying, lazy loading of services, signal handling, session-handling and automatic dependency discovery. *Then* you're talking.
Cron? Tchoh.
Martin
On Tue, Apr 04, 2006 at 10:36:24PM +0900, James Edward Gray II wrote:
On Apr 4, 2006, at 6:30 AM, Robert Dober wrote:
>Rewriting cron in ruby
Call me crazy, but that one sounds like fun to me.
Then watch as people gleefully hack into the newly started
RubyCronolithOfTheGods.
Could be fun though.
Zed A. Shaw
On 4/4/06 9:48 AM, "azrael@cream.org" <azrael@cream.org> wrote:
On Tue, Apr 04, 2006 at 10:36:24PM +0900, James Edward Gray II wrote:
On Apr 4, 2006, at 6:30 AM, Robert Dober wrote:
Rewriting cron in ruby
Call me crazy, but that one sounds like fun to me.
You should aim high, and think "bigger than cron".
Create one convention-over-configuration Ruby program with Needles that
can replace crond, atd, init, supervise, inetd and anything else that
starts a program ever; make it supports port-proxying, lazy loading of
services, signal handling, session-handling and automatic dependency
discovery. *Then* you're talking.Cron? Tchoh.
>
> >Rewriting cron in ruby
>
> Call me crazy, but that one sounds like fun to me.You should aim high, and think "bigger than cron".
Create one convention-over-configuration Ruby program with Needles that
can replace crond, atd, init, supervise, inetd and anything else that
starts a program ever; make it supports port-proxying, lazy loading of services,
signal handling, session-handling and automatic dependency discovery.
*Then* you're talking.
Spend some time looking at CFEngine and CFRuby/libcf if you choose to
go down this path.
On 4/4/06, azrael@cream.org <azrael@cream.org> wrote:
On Tue, Apr 04, 2006 at 10:36:24PM +0900, James Edward Gray II wrote:
> On Apr 4, 2006, at 6:30 AM, Robert Dober wrote:
Cron? Tchoh.
Martin
--
thanks,
-pate
-------------------------
Do not touch!!! This belongs to Hurd ![]()
On 4/4/06, azrael@cream.org <azrael@cream.org> wrote:
On Tue, Apr 04, 2006 at 10:36:24PM +0900, James Edward Gray II wrote:
> On Apr 4, 2006, at 6:30 AM, Robert Dober wrote:
>
> >Rewriting cron in ruby
>
> Call me crazy, but that one sounds like fun to me.You should aim high, and think "bigger than cron".
Create one convention-over-configuration Ruby program with Needles that
can replace crond, atd, init, supervise, inetd and anything else that
starts a program ever; make it supports port-proxying, lazy loading of
services, signal handling, session-handling and automatic dependency
discovery. *Then* you're talking.Cron? Tchoh.
Martin
--
Deux choses sont infinies : l'univers et la bêtise humaine ; en ce qui
concerne l'univers, je n'en ai pas acquis la certitude absolue.
- Albert Einstein
too bad launchd isn't written in ruby
On Apr 4, 2006, at 9:48 AM, azrael@cream.org wrote:
Call me crazy, but that one sounds like fun to me.
You should aim high, and think "bigger than cron".
Create one convention-over-configuration Ruby program with Needles that
can replace crond, atd, init, supervise, inetd and anything else that
starts a program ever; make it supports port-proxying, lazy loading of services, signal handling, session-handling and automatic dependency discovery. *Then* you're talking.Cron? Tchoh.
Martin
Ooh, this looks interesting.
Martin
On Tue, Apr 04, 2006 at 11:25:06PM +0900, pat eyler wrote:
On 4/4/06, azrael@cream.org <azrael@cream.org> wrote:
> On Tue, Apr 04, 2006 at 10:36:24PM +0900, James Edward Gray II wrote:
> > On Apr 4, 2006, at 6:30 AM, Robert Dober wrote:
> >
> > >Rewriting cron in ruby
> >
> > Call me crazy, but that one sounds like fun to me.
>
> You should aim high, and think "bigger than cron".
>
> Create one convention-over-configuration Ruby program with Needles that
> can replace crond, atd, init, supervise, inetd and anything else that
> starts a program ever; make it supports port-proxying, lazy loading of services,
> signal handling, session-handling and automatic dependency discovery.
> *Then* you're talking.Spend some time looking at CFEngine and CFRuby/libcf if you choose to
go down this path.