Paul Seamons wrote:
PS - unmaintainable solution in perl
perl -ne 'chop;@a=split;$n=grep{$t=abs($a[$_]-$a[$_-1]);!$t||$t[EMAIL
PROTECTED]
$#a;print$n?not a :,match\n'
I wasn't going to do this but you got me thinking:
perl -ape '$_=((grep{(abs($F[$_]-$F[$_-1])||@F+1)@F}1..$#F)?not a
Why does perl code always remind me of explitives?
On 11/2/06, Alan Young [EMAIL PROTECTED] wrote:
Paul Seamons wrote:
PS - unmaintainable solution in perl
perl -ne 'chop;@a=split;$n=grep{$t=abs($a[$_]-$a[$_-1]);!$t||$t[EMAIL
PROTECTED]
$#a;print$n?not a :,match\n'
I wasn't going to do
perl -ape '$_=((grep{(abs($F[$_]-$F[$_-1])||@F)[EMAIL PROTECTED])?not a
:).match\n'
/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/
Steve wrote:
Why does perl code always remind me of explitives?
The whole one-liner code pheonomenon is a big thing in the Perl community
because of Perl's TMTOWTDI characteristic. I think most good Perl
programmers, however, appreciate the value of readability. I know Paul is a
great Perl
On Thursday 02 November 2006 8:35 am, Alan Young wrote:
perl -ape '$_=((grep{(abs($F[$_]-$F[$_-1])||@F)[EMAIL PROTECTED])?not a
:).match\n'
Wow! Truly a thing of beauty.
-a - who knew.
Paul
/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Why does perl code always remind me of explitives?
Purely subliminal. Take ANY one-liner in perl, translate to binary, bitshift
3 to the right, kill the incomplete terminal byte, load in as an unicode
string and translate the resulting Chinese characters back into Engrish, and
behold the
Paul Seamons wrote:
On Thursday 02 November 2006 8:35 am, Alan Young wrote:
perl -ape '$_=((grep{(abs($F[$_]-$F[$_-1])||@F)[EMAIL PROTECTED])?not a
:).match\n'
Wow! Truly a thing of beauty.
-a - who knew.
*blush* Thanks.
My only problem with this method is that it goes through every
On Wed, Nov 01, 2006 at 11:20:45AM -0700, Josh Coates wrote:
Sample Question 1
We are looking for sequences of n 0 integers where the absolute values of
the differences of successive elements are included in the set of numbers 1
through n - 1. For instance,
4 1 2 3
I'm still a python
What are the pro's and con's of Orca and Munin. Is there something else
that just smokes the two. I have setup Munin before and love how fast
it is and the fact that I can tie it back to Nagios.
Thanks in advance,
Adam
/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe:
Here's a solution that short circuits as soon as the comparison is
larger than n:
perl -ape
'$_=match\n;$i=1;while($i@F){((abs($F[$i]-$F[$i-1])||@F)[EMAIL
PROTECTED])($_=not
a $_)([EMAIL PROTECTED]);$i++}'
Not as elegant as the others perhaps ...
/*
PLUG: http://plug.org, #utah on
On Thu, 2 Nov 2006 04:57:41 -0500, Barry Roberts [EMAIL PROTECTED]
said:
I'm still a python novice, but I thouhgt it would be fun to post a
python solution just for discussion.
Your python reference appears to be about 5 years old. :)
Here's a translation that uses some newer features.
Jonathan Ellis wrote:
Your python reference appears to be about 5 years old. :)
Here's a translation that uses some newer features. Untested, YMMV.
Hmm... Do BDS employees have to win the deathmatch to *retain* their
employment? ;)
--Dave
/*
PLUG: http://plug.org, #utah on
On Thu, 02 Nov 2006 10:13:34 -0800, Jonathan Ellis
[EMAIL PROTECTED] said:
On Thu, 2 Nov 2006 04:57:41 -0500, Barry Roberts [EMAIL PROTECTED]
said:
I'm still a python novice, but I thouhgt it would be fun to post a
python solution just for discussion.
Your python reference appears to be
On 11/2/06, Alan Young [EMAIL PROTECTED] wrote:
perl -ape
'$_=match\n;$i=1;while($i@F){((abs($F[$i]-$F[$i-1])||@F)[EMAIL
PROTECTED])($_=not
a $_)([EMAIL PROTECTED]);$i++}'
perl -ape '$_=match\n;$i=0;while(++$i@F){((abs($F[$i]-$F[$i-1])||@F)[EMAIL
PROTECTED])($_=not
a $_)last}'
I was tempted
On Thu, Nov 02, 2006 at 08:35:56AM -0700, Alan Young wrote:
perl -ape '$_=((grep{(abs($F[$_]-$F[$_-1])||@F)[EMAIL PROTECTED])?not a
^^^
Speaking of code monkeys
--
Charles Curley /\ASCII Ribbon Campaign
Looking for fine software \ /Respect for open
Some slight improvements to the PHP version
$i = split(\n, fread(fopen('php://stdin','r'), 8192));
foreach($i as $l) {
$u = split( ,$l);
$s = count($u);
if (strlen(trim($u[0])) == 0) echo(not a );
for($n=0;$n$s-1;$n++) {
if (abs($u[$n] - $u[$n+1])
and PHP as one-line
$i = split(\n, fread(fopen('php://stdin','r'), 8192)); foreach($i as
$l) { $u = split( ,$l); $s = count($u); if (strlen(trim($u[0])) ==
0) echo(not a ); for($n=0;$n$s-1;$n++) { if (abs($u[$n] - $u[$n+1])
$s) { printf(not a ); break; } } printf(match\n); }
/*
PLUG:
Charles Curley wrote:
On Thu, Nov 02, 2006 at 08:35:56AM -0700, Alan Young wrote:
perl -ape '$_=((grep{(abs($F[$_]-$F[$_-1])||@F)[EMAIL PROTECTED])?not a
^^^
Speaking of code monkeys...
Heh. Nice to know someone noticed. :]
/*
PLUG: http://plug.org, #utah on irc.freenode.net
Which implementation of Lisp will be used?
Dan
On 11/1/06, Josh Coates [EMAIL PROTECTED] wrote:
hi all,
just a notice that this saturday we (berkeley data systems) will be hosting
a utah-resident-only coding contest. we will be awarding the winner w/ a
$10K prize.
see details and a couple
iPhoto is amazing. You can tag each picture and make albums on the
fly
and instant slideshows. I love it. I think you can even post to a
photo
blog with it, but I have not tried it yet. I am still using Gallery2
for
online photo sharing.
My wife shared your love of iPhoto until it deleted
On Thu, November 2, 2006 12:49, Jonathan Duncan wrote:
On Wed, 1 Nov 2006, Ryan Simpkins wrote:
I'd like to get some opinions from everyone about how they organize their
digital
photo collections.
Right now I am using gallery2 and I'm not happy with how I started. I have
about
1,000
...that will allow open-source Linux software to work with the
company's Windows software
Exactly what does this mean?
---
http://money.cnn.com/2006/11/02/technology/microsoft_novell.reut/index.htm
November 2 2006: 3:13 PM EST
SEATTLE (Reuters) -- Microsoft Corp. is entering into an
Woot! MS Linux here we come!
On 11/2/06, Grant Shipley [EMAIL PROTECTED] wrote:
...that will allow open-source Linux software to work with the
company's Windows software
Exactly what does this mean?
---
http://money.cnn.com/2006/11/02/technology/microsoft_novell.reut/index.htm
November
Grant Shipley wrote:
...that will allow open-source Linux software to work with the
company's Windows software
Meh, probably has something to do with Mono. Who knows.
I'm glad MS is being gracious enough to permit FOSS to run on Windows
though.
Free press.
Steve
/*
PLUG:
Extend, Embrace, Thrust pointy end.
On 11/2/06, Steve Dibb [EMAIL PROTECTED] wrote:
Grant Shipley wrote:
...that will allow open-source Linux software to work with the
company's Windows software
Meh, probably has something to do with Mono. Who knows.
I'm glad MS is being gracious enough to
On Thu, 2006-11-02 at 15:53 -0500, Grant Shipley wrote:
SEATTLE (Reuters) -- Microsoft Corp. is entering into an agreement
with Novell Inc. that will allow open-source Linux software to work
with the company's Windows software, The Wall Street Journal reported
on Thursday.
Why does this
My wife shared your love of iPhoto until it deleted all of her photos
when she upgraded to a newer version. Yeah, she was a bit miffed
about
that. She lost several hundred photos that hadn't been backed up.
She
uses Adobe Bridge mostly now.
I would never trust digital assets to any
On 11/2/06, Christer Edwards [EMAIL PROTECTED] wrote:
On Thu, 2006-11-02 at 15:53 -0500, Grant Shipley wrote:
SEATTLE (Reuters) -- Microsoft Corp. is entering into an agreement
with Novell Inc. that will allow open-source Linux software to work
with the company's Windows software, The Wall
Thus said Josh Coates on Wed, 01 Nov 2006 11:20:45 MST:
We are looking for sequences of n 0 integers where the absolute
values of the differences of successive elements are included in the
set of numbers 1 through n - 1. For instance,
Shouldn't this be more like:
... where the
On 11/2/06, Jonathan Duncan [EMAIL PROTECTED] wrote:
iPhoto is amazing. You can tag each picture and make albums on the fly
and instant slideshows. I love it. I think you can even post to a photo
blog with it, but I have not tried it yet. I am still using Gallery2 for
online photo sharing.
Do I have a point? Not really. I guess just be careful with any of
those programs that claim control over your existing files like
iPhoto
does.
What do you mean by claim control?
iPhoto modifies the files and hides away the data to some internal
location (at least it used to, it may
On Thu, 2 Nov 2006, Hill, Greg wrote:
iPhoto is amazing. You can tag each picture and make albums on the
fly
and instant slideshows. I love it. I think you can even post to a
photo
blog with it, but I have not tried it yet. I am still using Gallery2
for
online photo sharing.
My
On 11/2/06, Hill, Greg [EMAIL PROTECTED] wrote:
location (at least it used to, it may not any more). Once you import,
you can no longer directly access your files in the filesystem (they're
all 0 bytes). Of course, she may have done something to cause this, but
all she knows she did was
iPhoto modifies the files and hides away the data to some internal
location (at least it used to, it may not any more). Once you import,
you can no longer directly access your files in the filesystem
(they're
all 0 bytes). Of course, she may have done something to cause
this, but
all she
I just realized that this really does not fit with FOSS, since iPhoto
is
not free, unless you have a Mac. Sorry.
It still isn't free. It costs money for the iLife suite, although new
Macs come with it bundled. OS:X isn't free, either.
Greg
/*
PLUG: http://plug.org, #utah on
On Nov 2, 2006, at 2:40 PM, Grant Shipley wrote:
On 11/2/06, Jonathan Duncan [EMAIL PROTECTED] wrote:
iPhoto is amazing. You can tag each picture and make albums on
the fly
and instant slideshows. I love it. I think you can even post to
a photo
blog with it, but I have not tried it yet.
I have this bash script, as follows:
#!/bin/sh
[EMAIL PROTECTED]
SUBJECT=Running on `hostname`
ls | mail -s $SUBJECT - sent $RECIP
I do get the mail at the [EMAIL PROTECTED] account, but the
subject is only Running, and it has been sent to other recipients,
which correspond to the words missing
Thus said Josh Coates on Wed, 01 Nov 2006 11:20:45 MST:
We are looking for sequences of n 0 integers where the absolute
values of the differences of successive elements are included in the
set of numbers 1 through n - 1. For instance,
I think I see the confusion in my last
On 11/2/06, Scott Morris [EMAIL PROTECTED] wrote:
I have this bash script, as follows:
#!/bin/sh
[EMAIL PROTECTED]
SUBJECT=Running on `hostname`
ls | mail -s $SUBJECT - sent $RECIP
Try
ls | mail -s $SUBJECT - sent $RECIP
or
ls | mail -s \$SUBJECT\ - sent $RECIP
instead.
Michael
/*
PLUG:
On 11/2/06, Grant Robinson [EMAIL PROTECTED] wrote:
Settle down, pal. The original poster never specified that it had to
be open-source, nor that it had to run on Linux. One might assume
that, based on the list being posted to, but it was never made
clear.
Or --- one could assume it from
On Nov 2, 2006, at 2:44 PM, Grant Shipley wrote:
On 11/2/06, Hill, Greg [EMAIL PROTECTED] wrote:
location (at least it used to, it may not any more). Once you
import,
you can no longer directly access your files in the filesystem
(they're
all 0 bytes). Of course, she may have done
Thus said Scott Morris on Thu, 02 Nov 2006 14:59:49 MST:
Any thoughts on how this could be accomplished?
How about:
#!/bin/sh
[EMAIL PROTECTED]
ls | mail -s Running on `hostname` - sent $RECIP
Andy
--
[---[system uptime]]
3:06pm up 4
On 11/2/06, Grant Robinson [EMAIL PROTECTED] wrote:
I think the real question is, why so much animosity?
Seriously, pal, did Steve Jobs run off with your girlfriend or
something? :)
No he didn't. :)
Why the animosity? Good question.
I have always worked at open source companies. I
On 11/2/06, Andy Bradford [EMAIL PROTECTED] wrote:
Thus said Scott Morris on Thu, 02 Nov 2006 14:59:49 MST:
Any thoughts on how this could be accomplished?
How about:
#!/bin/sh
[EMAIL PROTECTED]
ls | mail -s Running on `hostname` - sent $RECIP
Or even:
ls | mail -s Running on $HOSTNAME -
On Nov 2, 2006, at 2:05 PM, Grant Robinson wrote:
On Nov 2, 2006, at 2:44 PM, Grant Shipley wrote:
On 11/2/06, Hill, Greg [EMAIL PROTECTED] wrote:
location (at least it used to, it may not any more). Once you
import,
you can no longer directly access your files in the filesystem
On Nov 2, 2006, at 3:05 PM, Grant Shipley wrote:
On 11/2/06, Grant Robinson [EMAIL PROTECTED] wrote:
Settle down, pal. The original poster never specified that it had to
be open-source, nor that it had to run on Linux. One might assume
that, based on the list being posted to, but it was
On 11/2/06, Grant Robinson [EMAIL PROTECTED] wrote:
I always find this to be a funny statement. Looking at the source
code would take WAY more time then just looking at the filesystem.
Unless you are a contributing member of the project, looking at the
source code of just about anything can be
On Nov 2, 2006, at 3:11 PM, Grant Shipley wrote:
Why the animosity? Good question.
I have always worked at open source companies. I currently write open
source software for a living. I guess it comes down to firmly
believing in what I do every day.
And that is most often a good thing.
On 11/2/06, Grant Robinson [EMAIL PROTECTED] wrote:
In any case, FOSS runs on other platforms besides linux, which was
also part of your sarcastic comment.
agreed.
Lastly, handing out alternative solutions is widely done on plug.
Witness the many threads of How do I do x with Fedora Core
On Nov 2, 2006, at 3:16 PM, Grant Shipley wrote:
On 11/2/06, Grant Robinson [EMAIL PROTECTED] wrote:
I always find this to be a funny statement. Looking at the source
code would take WAY more time then just looking at the filesystem.
Unless you are a contributing member of the project,
Andy Bradford wrote:
So, your first example:
4 1 2 3
Would have resulted in { 3 1 1 } but since 3 was not in { 4 1 2 }, I was
getting no match. Of course when matching against { 1 2 3 } there is a
match.
Eh? I'm not sure you understand the problem correctly.
The problem is just
Which implementation of Lisp will be used?
common lisp, scheme and of course ucblogo.
-josh
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Daniel C.
Sent: Thursday, November 02, 2006 1:08 PM
To: Provo Linux Users Group Mailing List
Subject:
On Nov 2, 2006, at 3:24 PM, Jonathan Duncan wrote:
snip
I think that you probably meant not everyone who uses Gentoo is a
masochist. In which case I must be looking forward to being
drawn, quartered, and hung, since I use both Gentoo and Mac OS X. =)
Yeah, that is what I meant. :)
Thus said Shane Hathaway on Thu, 02 Nov 2006 15:30:02 MST:
Eh? I'm not sure you understand the problem correctly.
I didn't at first, which is why I posted my first message. By the time I
posted my second message I thought I understood it, but I could still be
wrong. My question was about which
Thus said Andy Bradford on Thu, 02 Nov 2006 16:23:05 MST:
We are looking for sequences with n 0 elements where the absolute
values of the differences of successive elements are all less than n
elements - 1 and greater than 1?
Er, I meant ``... greater than or equal to 1.''
Andy
--
Andy Bradford wrote:
Doesn't this say to check the absolute value of the difference between
two numbers in a sequence against a set of numbers 1, ... n-1? I suppose
one could infer that this is a test for the maximum variance of any two
integers in the sequence against one less than the
Thus said Shane Hathaway on Thu, 02 Nov 2006 16:34:45 MST:
Josh's explanation is mathematically precise and concise, but not easy
to grasp without reading it over a couple of times. Some imprecise
inference often helps.
So, unless I'm reading my Python code incorrectly, it would appear
On Thu, Nov 02, 2006 at 05:20:21PM -0700, Andy Bradford wrote:
So, unless I'm reading my Python code incorrectly, it would appear that
I'm not the only one that misinterpreted which sequence should be used
when making the comparision.
Yep. I interpreted it incorrectly.
Barry
/*
PLUG:
Yep. I interpreted it incorrectly.
sorry about the terse problem descriptions. just about every problem will
have sample input and sample output - the intention is to help clarify the
problem.
registration begins tomorrow.
good luck everyone, and have fun. ;-)
-josh
-Original
Andy Bradford wrote:
So, unless I'm reading my Python code incorrectly, it would appear that
I'm not the only one that misinterpreted which sequence should be used
when making the comparision.
Actually, Josh used sequence in one part of the sentence and set in
the other, which is enough
This, I believe, is a correct Python implementation:
#!/usr/bin/python
import sys, string;
for currLine in sys.stdin:
nums = map(int, string.split(string.strip(currLine), ' '))
for ind in range(len(nums)-1):
diff=abs(nums[ind]-nums[ind+1])
if diff == 0 or diff =
Thus said Barry Roberts on Thu, 02 Nov 2006 12:40:49 EST:
On Thu, Nov 02, 2006 at 05:20:21PM -0700, Andy Bradford wrote:
So, unless I'm reading my Python code incorrectly, it would appear
that I'm not the only one that misinterpreted which sequence should
be used when making the
On Thu, 2006-11-02 at 15:53 -0500, Grant Shipley wrote:
Exactly what does this mean?
It's BIG.
http://www.novell.com/news/press/item.jsp?id=1196
http://www.novell.com/linux/microsoft/faq.html
http://www.novell.com/linux/microsoft/webcast.html
On 11/2/06, Andy Bradford [EMAIL PROTECTED] wrote:
By the way, here's a tally of runtimes on my PC:
Python: .045ms on average
Tcl [1]: .016ms on average
Perl: .0125ms on average
Looks like Perl wins out on speed. I didn't have PHP installed (who uses
PHP for scripting anyways) so someone else
--- Daniel [EMAIL PROTECTED] wrote:
Brian,
/var/log/secure will contain logs for the ssh server.
That depends on the distribution. Red Hat and its derivatives
use /var/log/secure. FreeBSD uses /var/log/auth.log, and I think
Debian does, too. SuSE uses /var/log/messages. I have no idea
On Thu, 2006-11-02 at 20:11 -0700, Gabriel Gunderson wrote:
I haven't read it all yet. I don't yet know what to think.
The more I read about the patent agreements and IP issues, the more
this starts smelling fishy. It looks like it sets up Novell as the only
Linux distributor that will be
On Thu, 2006-11-02 at 20:58 -0700, Gabriel Gunderson wrote:
On Thu, 2006-11-02 at 20:11 -0700, Gabriel Gunderson wrote:
I haven't read it all yet. I don't yet know what to think.
The more I read about the patent agreements and IP issues, the more
this starts smelling fishy. It looks like
On Thu, Nov 02, 2006 at 08:11:48PM -0700, Gabriel Gunderson wrote:
On Thu, 2006-11-02 at 15:53 -0500, Grant Shipley wrote:
Exactly what does this mean?
It's BIG.
http://www.novell.com/news/press/item.jsp?id=1196
http://www.novell.com/linux/microsoft/faq.html
Thats the great thing about plug. My point was, we are a linux users
group and should not be suggesting applications that are not FOSS. I
just find it funny that a good portion of linux community
(generalization, wave hands, wave hands again) have decided that using
OS-X is a suitable
Michael A. Cleverly wrote:
On 11/2/06, Andy Bradford [EMAIL PROTECTED] wrote:
Thus said Scott Morris on Thu, 02 Nov 2006 14:59:49 MST:
Any thoughts on how this could be accomplished?
How about:
#!/bin/sh
[EMAIL PROTECTED]
ls | mail -s Running on `hostname` - sent $RECIP
Or even:
Grant Shipley wrote:
...that will allow open-source Linux software to work with the
company's Windows software
Exactly what does this mean?
Like others, I'm not really sure either of the long-term implications, but I
do know one thing: This doesn't seem like the kind of move you'd ever see
On Nov 2, 2006, at 10:04 PM, Christer Edwards wrote:
Maybe I have stars in my eyes and sing nightly with RMS or
maybe I
should step off of my high horse and realize most linux applications
suck.
I think they call people like you and I zealots. Those that sing
praises with RMS and only
On Nov 2, 2006, at 9:51 PM, Charles Curley wrote:
I find one thing disconcerting. According to the Open Letter
(http://www.novell.com/linux/microsoft/openletter.html):
# Office Open XML
* Novell engineers have been working for the last year
together with
On Nov 2, 2006, at 11:03 PM, Levi Pearson wrote:
You must be looking at this through some weird, distorted Free
Software glasses or something. Clearly Open Document is Betamax
and Microsoft's new Open XML standard is VHS. Betamax vs. VHS was
all about market share, and in the real world,
74 matches
Mail list logo